ha-sankey-chart
ha-sankey-chart copied to clipboard
Feature - Support Entity Groups
So, I have been having great success using this to plot my home's energy utilization from source, to consumer.
However, while I have been making these diagrams- I thought of a way which would make this much nicer. The ability to configure things using groups.
Say, for example, instead of this:
- entities:
- entity_id: sensor.load_power_essential
color: blue
children:
- sensor.bedroom_power
- sensor.lights_power
- sensor.server_power
- entity_id: sensor.load_power_non_essential
color: yellow
children:
- sensor.dishwasher_power
- sensor.dryer_power
- sensor.garage_power
- sensor.kitchen_power
- sensor.livingroom_power
- sensor.hvac_total_power
- sensor.noncritical_other_loads
- untracked
- entities:
- entity_id: sensor.server_power
color: plum
children:
- sensor.kube01_current_consumption
- sensor.kube05_current_consumption
- sensor.kube06_current_consumption
- sensor.unifi_aggregation_switch_current_consumption
- sensor.nvr_current_consumption
- sensor.kasa_smart_plug_383a_2_current_consumption
- sensor.truenas_power
- Server - Other
- entity_id: sensor.bedroom_power
name: Office
color: LightBlue
children:
- sensor.gaming_pc_current_consumption
- sensor.wife_pc_current_consumption
- sensor.monitors_current_consumption
- sensor.internet_current_consumption
- sensor.work_pc_current_consumption
- sensor.bedroom_switch_current_consumption
- Office - Other
We could specify this:
- entities:
- entity_id: sensor.load_power_essential
color: blue
remaining: untracked_critical
children_group: group.power_rollup_load_power_essential
- entity_id: sensor.load_power_non_essential
children_group: group.power_rollup_load_power_non_essential
- entities:
- entity_id: sensor.server_power
color: plum
children_group: group.power_rollup_server
children_group_remaining:
name: Server - Other
- entity_id: sensor.bedroom_power
name: Office
color: LightBlue
children_group: group.power_rollup_office_essential
children_group_remaining:
name: Office - Other
If, such a thing were feasible, it would make it easily possible to reuse the groups for other dashboard panels as well.
Lastly, I think this would improve the overall usability, and reduce the amount of configuration required. Potentially.
Just- an idea.
Interesting idea. I'll have think about this
@MindFreeze "The ability to configure things using groups." As an addition, maybe having the grouping done based on area (if configured) might be an idea as well.
Area makes more sense than groups tbh. According to HA groups are meant to combine entities and get an aggregate state, not just to organize stuff. You are supposed to organize based on areas and entity types.
I already do this with areas for autoconfig but there I already have a list of devices and just group them by area. Starting from an area and figuring out which entities to display will be more difficult
If you go with areas, make sure you add functionality to apply filtering logic, like custom:auto-entities.
Otherwise, picking out the specific entities you are wanting to plot, can be challenging.
That being said- i'd still lean towards being able to use groups, as it gives very granular control to the user.
Agree with leveraging areas; I have really leand into using them for various things.
So it is was in the Sankey I could then see it broken down by room (Area) and then to the individual consumers.
Maybe the new(-ish) labels could be used for groupings?
Maybe the new(-ish) labels could be used for groupings?
That would be a fantastic idea.