Multiple entities and grouping with different calculation modes
See original GitHub issueI´ve added multiple entities with different fixed calculation values to a group and wanted it to create a summary entity. The summary entity just uses the power consumption of last added entity and ignores the rest. In the first place the summary entity showed Unknown as value, i removed the create_group and then added it again, after that the problem above showed up.
This is my config.
sensor:
- platform: powercalc
create_group: All heaters
entities:
- entity_id: switch.heizung_working_room_on_off
name: Arbeitszimmer
fixed:
power: 900
- entity_id: switch.heizung_bad_on_off
name: Bad
fixed:
power: 450
- entity_id: switch.heizung_schlafzimmer_on_off
name: Schlafzimmer
fixed:
power: 580
- entity_id: switch.heizung_flur_on_off
name: Flur
fixed:
power: 580
- entity_id: switch.heizung_living_room_on_off
name: Wohnzimmer
fixed:
power: 900
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Understanding Calculation Groups - SQLBI
There are two entities to consider: calculation groups and calculation items. A calculation group is a collection of calculation items, ...
Read more >4.4.3 Calculating the mode - Statistique Canada
When it's unique, the mode is the value that appears the most often in a data set and it can be used as...
Read more >Calculation groups in Analysis Services tabular models
Values for each row are calculated from the base measure, Sales. Calculation groups work with explicit DAX measures.
Read more >Calculated Fields | Visualize and present data - Mode Support
Calculated Field Component Types ; 1, Constant, A fixed value. 1. TRUE ; 2, Scalar, Values are mapped to a single result in...
Read more >How To Calculate Mode (With Examples) | Indeed.com
Learn what a mode is in data sets and how to calculate mode, and explore several examples of using mode.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Will be fixed with #304
@nicodoerr Was able to reproduce the issue with name properties. I have some ideas how to fix it, however the fix is far from simple. Have some unwanted side effects with a few things I tried. Not sure if I will fix it at all because it is really an edge case, which I don’t think many users will experience.
The bug will arise when the source entity has a unique id. The energy sensor will also be created with this unique id. When you change the name later on the energy sensor will keep the old entity_id (this is because the energy sensor has a unique id). The group sensors will refer to the new entity_id so that’s why they are broken.