Can you post your config and this screenshot + a shot of your energy distribution card in Auto config for energy dashboard · Issue #60 · MindFreeze/ha-sankey-chart · GitHub ?
I have to know how your energy dashboard is configured to figure this out.
autoconfig: null
is a weird one. If my guess is correct and you just want the config printed, you need:
autoconfig:
print_yaml: true
try v1.5.1
Then I get the following error messages (cleared cache of course)
The problem was autoconfig: true
. It is supposed to be an object, not a boolean. See the examples here and in the readme. Anyway, this will work as well in 1.5.2
is there an easy way to copy paste the printed yaml? All my browsers seem to lack this.
Did you get all the sensors from your existing energy setup or did you have to make some unique template sensors to maket it work?
Cant get the autoconfig work as wel. Running the latest HA
Yaml:
- type: energy-date-selection
- type: custom:sankey-chart
autoconfig:
print_yaml: false
I get this result:
And if i try to put them together in one card:
Is it possible to passthrough and add up remaining values as well?
Code example
- entities:
- entity_id: sensor.phase_1_power
name: Phase 1
children:
- sensor.heat_pump_phase_1_power
- sensor.downstairs_wc_mirror_lights_power
- sensor.downstairs_wc_ceiling_lights_power
- sensor.sauna_wahing_room_lights_power
- sensor.sauna_lights_power
- sensor.bathroom_lights_power
- sensor.bathroom_lights_power_2
- sensor.matu_s_room_lights_dimmer_power
- sensor.bedroom_lights_power
- sensor.marlon_s_room_lights_power
- sensor.pergola_lightning_power
- sensor.outdoor_kitchen_lights_power
remaining:
name: Other
Would like to add them up in the final segment
I have no idea why this is happening. You can submit a bug report in github and I’ll try to reproduce it when I have the time.
As for combining remaining, you can create passthrough
entities for them and combine those with a remaining_parent_state
in the next section. In theory
Finally got some time to work on the Sankey of my consumption at home. The issue is that I still do not understand why “lights” and “overige” isn’t at the same level as Zolder. Can anyone give me any tips on how to accomplish that? I believe in the yaml both lights, zolder, overige and keukenapparatuur is all at the same level…
Relevant yaml:
type: custom:sankey-chart
show_names: true
wide: true
unit_prefix: k
round: 2
sections:
- entities:
- entity_id: sensor.calculated_daily_energy_consumption_house
name: Totaal
children:
- sensor.zolder_totaal_helper_daily
- sensor.keukenapparatuur_totaal_helper_daily
- sensor.verlichting_totaal_helper_daily
- sensor.overig_totaal_helper_daily
- sensor.unmeasured_daily_energy_consumption_house
- entities:
- entity_id: sensor.overig_totaal_helper_daily
name: Overig
children:
- sensor.utility_meter_eettafel_daily_nieuw
- sensor.utility_meter_zwave_daily
- sensor.utility_meter_tv_daily
- sensor.utility_meter_fj_stopcontact_daily_nieuw
- sensor.utility_meter_kamer_laurens_daily_nieuw
- entities:
- entity_id: sensor.verlichting_totaal_helper_daily
name: Lights
color: yellow
children:
- sensor.utility_meter_licht_eettafel_group_daily
- sensor.utility_meter_licht_schuur_poort_daily
- sensor.utility_meter_licht_tv_group_daily
- sensor.utility_meter_licht_voordeur_daily
- sensor.utility_meter_licht_zijmuur_daily
- sensor.utility_meter_licht_badkamer_spiegel_daily
- sensor.utility_meter_licht_keuken_daily
- entities:
- entity_id: sensor.keukenapparatuur_totaal_helper_daily
name: Keuken
children:
- sensor.utility_meter_fridge_daily
- sensor.utility_meter_oven_daily
- sensor.utility_meter_quooker_daily
- sensor.utility_meter_espresso_machine_daily
- sensor.utility_meter_dishwasher_daily
- sensor.utility_meter_magnetron_daily_nieuw
- entities:
- entity_id: sensor.zolder_totaal_helper_daily
name: Zolder
children:
- sensor.utility_meter_koelvriezer_daily
- sensor.utility_meter_3d_printer_daily_nieuw
- sensor.utility_meter_wasmachine_daily
- sensor.utility_meter_dryer_daily
- sensor.utility_meter_cvketel_daily
- sensor.utility_meter_zolder_daily_nieuw
- entities:
- entity_id: sensor.utility_meter_koelvriezer_daily
- entity_id: sensor.utility_meter_3d_printer_daily_nieuw
- entity_id: sensor.utility_meter_wasmachine_daily
- entity_id: sensor.utility_meter_dryer_daily
- entity_id: sensor.utility_meter_cvketel_daily
- entity_id: sensor.utility_meter_zolder_daily_nieuw
- entity_id: sensor.utility_meter_fridge_daily
- entity_id: sensor.utility_meter_oven_daily
- entity_id: sensor.utility_meter_quooker_daily
- entity_id: sensor.utility_meter_espresso_machine_daily
- entity_id: sensor.utility_meter_dishwasher_daily
- entity_id: sensor.utility_meter_magnetron_daily_nieuw
- entity_id: sensor.utility_meter_licht_eettafel_group_daily
color: yellow
- entity_id: sensor.utility_meter_licht_schuur_poort_daily
color: yellow
- entity_id: sensor.utility_meter_licht_tv_group_daily
color: yellow
- entity_id: sensor.utility_meter_licht_voordeur_daily
color: yellow
- entity_id: sensor.utility_meter_licht_zijmuur_daily
color: yellow
- entity_id: sensor.utility_meter_licht_badkamer_spiegel_daily
color: yellow
- entity_id: sensor.utility_meter_licht_keuken_daily
color: yellow
- entity_id: sensor.utility_meter_eettafel_daily_nieuw
- entity_id: sensor.utility_meter_zwave_daily
- entity_id: sensor.utility_meter_tv_daily
- entity_id: sensor.utility_meter_fj_stopcontact_daily_nieuw
- entity_id: sensor.utility_meter_kamer_laurens_daily_nieuw
- entity_id: sensor.unmeasured_daily_energy_consumption_house
name: ongemeten
color: red
They are not on the same level in the yaml. Every time you add - entities:
you are starting a new section(level). You should remove 3 - entities:
lines to have only 3 sections
seems every time I click the al_het_andere entity in the chart, the browser chokes on that:
Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/connection.py:104
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 09:21:57 (1 occurrences)
Last logged: 09:21:57
[140467527016240] Error handling message: Entity ID al_het_andere is an invalid entity ID for dictionary value @ data['entity_id']. Got 'al_het_andere' (invalid_format) from 192.168.1.41 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15)
config is:
- entities:
- entity_id: sensor.energy_consumed_daily
name: Gemeten verbruik
color: '#488FC2'
children:
- sensor.alle_lampen_daily
- sensor.patchboard_zolder_daily
- sensor.inductieplaat_keuken_daily
- sensor.switches_daily_energy #sensor.switches_totaal_energy_daily
- sensor.switches_total_device_energy_daily
- sensor.non_switches_daily
- al_het_andere
- entities:
- entity_id: sensor.alle_lampen_daily
- entity_id: sensor.patchboard_zolder_daily
- entity_id: sensor.inductieplaat_keuken_daily
- entity_id: sensor.switches_daily_energy #sensor.switches_totaal_energy_daily
children:
- sensor.boiler_bijkeuken_daily
- etcetcetc
- entity_id: sensor.switches_total_device_energy_daily
- entity_id: sensor.non_switches_daily
- entity_id: al_het_andere
type: remaining_parent_state
name: Alle andere
and also recorder logs an error:
Logger: homeassistant.components.recorder.util
Source: components/recorder/util.py:105
Integration: Recorder (documentation, issues)
First occurred: 08:27:11 (2 occurrences)
Last logged: 09:21:54
Error executing query: Invalid entity ID al_het_andere
Well yes, there is no such entity. If you want one, you have to create it in HA with templates. A card can’t do that.
but how could we? the card does calculate the ‘remaining’ all the rest value? its not something we have entered.
are you suggesting to create an explicit template sensor, and replace the config option altogether?
it would make that a moot option, while it currently has the beauty of fixing it for the user.
btw (and please shoot me if this was discussed before): can we order the children list on value?
it would probably make the card even more useful setting the big numbers atop (ofc, not all use cases would require that, min here certainly would)
I’d love to set/control the huge empty white space in the right, do we have options for that? As you can see the right most heater library causes the column to the left of that to be hidden almost entirely
adding it to a panel would probably be the best option for this beautiful card, and make it shine optimally:
(aware I need to give some love to the colors, but happy I got the entities right first )
The “remaining” options were made specifically to address the issue that many people didn’t want to have extra entities in HA but still show such calculated values. The canonical way would be to calculate this yourself with a template sensor and use that in the card. This way you also get history and other HA benefits for this entity. However users don’t want entities and don’t care about history for these cases it seems. All of this is of course moot because cards can’t create entities, integrations/components do that.
Sorting has been requested Alignment and sorting of entities · Issue #6 · MindFreeze/ha-sankey-chart · GitHub & manually set location for children · Issue #38 · MindFreeze/ha-sankey-chart · GitHub
sure, I fully appreciate and understand.
in my case, I just made this verbose template to start, maybe I can make it smarter:
- unique_id: unaccounted_daily_energy
name: Ongemeten energy per dag
<<: *energy
icon: mdi:ghost
state: >
{{(states('sensor.energy_consumed_daily')|float(0) -
states('sensor.alle_lampen_daily')|float(0) -
states('sensor.patchboard_zolder_daily')|float(0) -
states('sensor.inductieplaat_keuken_daily')|float(0) -
states('sensor.switches_daily_energy')|float(0) -
states('sensor.heaters_daily_energy')|float(0) -
states('sensor.non_switches_daily')|float(0))|round(2)}}
thanks for the links, Ill check those and chime in if helpful.
the entities with suffix _daily are utility meter entities, the suffix _daily_energy are template sensors, which I needed because the utility meter entities I had for this at first seem to blow up in certain circumstances. (TomL in Discord advised to create availability sensors on those to mitigate some issues, which I did ofc) but this works ok for now.
just to be sure: I dont need the type: remaining_parent_state
when using that template sensor, since it now doesnt require the card to calculate things?