InventoCasa / ha-advanced-blueprints

Advanced Blueprints combined with pyscript for extra useful automations
139 stars 33 forks source link

Switch on high prio devices, even if they only use a fraction of the excess power. #63

Closed Maik7 closed 3 weeks ago

Maik7 commented 1 month ago

Hi,

I would like to add a feature to turn on devices with prio > 500, even if they only use a fraction of the excess power.

I have a small PV system (balcony power plant) and like to use all the solar power. And I run automations that update the prio. For example, a heater for the fish tank or a fridge. Depending on how long they are off, I increase the priority to turn them on even if they cannot be 100% solar (and turn them on directly after a while). Similarly for charging a battery (e-bike). If I set a target date, the priority is increased depending on the remaining time and the predicted solar power. This means that if I need to switch on the devices in the near future, but the excess power is not sufficient to use 100% excess power, it might be better to switch them on now with some excess power.

Alternatively, the new behaviour can be limited for prio > 1000 (and new max prio 2000) to maintain backwards compatibility.