Hello,
I am trying to find a way to have a graph in a form of “stacked” bars or lines to represent how each sensor contributes to the overall value.
A tipical use case is this:
1 - one sensor representing the consumption from the grid
2 - one or more sensor representing the various appliances
3 - one template sensor that represent “other” obtained by doing 1-2
I would be able to graph the sensors 2(one for each appliance) and 3 in a stacked form:
Stacked: true only causes separated graphs to be shown on the same graph. But the entities are not stacked into one bar or curve. They are still shown as separate bars (besides each other).
@onstra12345 Could you please share your code, how you managed to have stacked the bars using multiple entities?
I’m trying and trying, but I’m unable to get it to work unfortunatly.
I would like to know this as well. I wasn’t able to acomplish it. In my case, I would like to have a stacked bar graph showing the energy usage and two line graphs on top showing the produced solar energy and the energy coming from the battery. Unfortunately the two line graphs are stacking as well.
Does anyone have a solution for this?
^^ Note in the above that the point highlighted shows the TV is using ~73W, and the Internet plug ~28W - and the axis on the left shows it to be above 90W - so that makes sense for stacked.
I’ve applied AREA to all_series_config so it applies to all entities, rather than have to do it separately, which would look like the below otherwise (snippet):
series:
- entity: sensor.dish_washer_plug_current_power
type: area
- entity: sensor.washing_machine_plug_current_power
type: area
- entity: sensor.tv_plug_current_power
type: area
- entity: sensor.internet_plug_current_power
type: area
I’m looking for a slightly more complicated example. Two stacked additive areas, one substractive area and one non-stacked line, all into the same chart. Does anyone know if this is possible?