One of my history graphs is showing two datasets each with a different color.
I am not aware that I defined something in the configuration to achieve this.
Can someone advice me on how the control works to get more datasets in one graph
One of my history graphs is showing two datasets each with a different color.
I am not aware that I defined something in the configuration to achieve this.
Can someone advice me on how the control works to get more datasets in one graph
In principle, only items with the same unit_of_measurement will show in the same graph.
This could be ‘%’, ‘MiB’, ‘kWh’, ‘kWh total’ or anything else that is pre-defined or that you define.
If you want to increase your chances to see more than one curve in on chart you need to align the units.
Maybe you can post a screenshot to show details.
Thanks.
Can this be controlled?
What if I want de datasets with the same unit to be displayed in seperate graphs.
I am managing that be assigning different ‘unit_of_measurement’ strings to these values:
sensor:
- platform: template
sensors:
tp_link1_dwatts:
value_template: '{{ states.switch.kitchenplug.attributes["today_energy_kwh"] | replace(" kW", "") | float | round(1) }}'
unit_of_measurement: 'kWh today'
friendly_name: Daily kWh (Pump)
tp_link1_twatts:
value_template: '{{ states.switch.kitchenplug.attributes["total_energy_kwh"] | replace(" kW", "") | float | round(1) }}'
unit_of_measurement: 'kWh total'
friendly_name: Total kWh (Pump)
This scales each graph as required, i.e. the values for today might only be 2kWh while the total values are around 200kWh.
Great solution!
Thanks
Would you mind marking the topic as solved so that other people can see it when they search for a topic like this one?