batpred icon indicating copy to clipboard operation
batpred copied to clipboard

Possibility to use a sensor as forecasted load

Open djfanatix opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. No

Use Case Not every 'Tuesday' has the same home load profile (shift work), depending on presence. But we have some continuity in the load. Proposal: make a home assistant sensor which defines the predicted load of the day.

Improvement

  • Expert feature: Use a Home Assistant template sensor as a forecast load of the home. The user can make an automation depending on calendar, presence or else to define the template. For Example:

sensor has template: [350, 350, 350, 350, 350, 450, 450, 700, 700, 350, 350, 350, 350, 350, 350, 350, 350, 500, 1200, 1200, 1200, 550, 450, 350]

Each value is the projected power consumption for that hour of the day.

But can also be the remaining power consumption for that day

- name: "Load average" unique_id: load_average state: >- {% set current_hour = now().strftime('%H') | int %} {% set data = states('sensor.load_average_raw', 'data') | from_json %} {% set values = data.data %} {% set values_to_remove = current_hour - 1 %} {% if values_to_remove > 0 %} {% set values = values[values_to_remove:] %} {% endif %} {{ values }}

djfanatix avatar Jun 10 '24 16:06 djfanatix

Interesting idea, but the load isn't just one figure, would scaling the entire day really represent the profile?

Have you looked at PredAI yet?

springfall2008 avatar Jun 11 '24 19:06 springfall2008