I have a sensor for each upcoming day, with the kWh forecast of solar production.
I’d like to show all days in a bar graph. Therefore all forecast sensors need to be combined into one, so apex charts (or others) can plot it.
Is there a way to combine multiple sensors into one? I would be fine with attributes, too, as there is a way with data_generator to extract them in apex charts.
Thanks for the link, but the topic wants to sum multiple sensors into one to get a total. Today that’s easy to do with sum helpers.
My question is on how to append multiple sensors into one in a timely manner. A form of concatenate, as each of the example sensors is for a different day.
Maybe for better understandig of my initial post, I graphed my usecase with some ascii art:
sensor_forecast_day1: 11kWh -----------+
|
sensor_forecast_day2: 12kWh -----------+---> sensor_combined_forecast
| - shows value of day 1 at timepoint now()+1day: 11kWh
sensor_forecast_day3: 13kWh -----------+ - shows value of day 2 at timepoint now()+2day: 12kWh
- shows value of day 3 at timepoint now()+2day: 13kWh
graphed as timeline:
11 12 13 kWh
+-------+-------+-------+----...-->
now day1 day2 day3
For my data, here is the complete solution I got so far:
This combo thing is only needed because each value is in the future and each day is represented in its own day sensor.
Your use case seems to be plain graphing of historical data where you put in as many sensors you like. (assuming systolic sensor is always the same sensor with different values for each past day)
If you want to change devices and keep the same line of graph, you might use a template sensor as a facade. That’s what I do for my solar stuff. The energy dashboard is happily pulling data from the template sensor and keeps statistics working, but I have the possibility to change inverters or solar wattage sources in the background without breaking the energy dashboard.
You might need to have a look at recorder and history integrations to keep your data for such a long time.