InventoCasa / ha-advanced-blueprints

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

Support miniumum and maxiumum run time #80

Open nicorusti opened 2 weeks ago

nicorusti commented 2 weeks ago

Addresses #32 , based on work by @alistair23.

Some work done:

@alistair23 would it be ok to contribute your work to the main repository?

Pending issues:

Improvements:

alistair23 commented 2 weeks ago

@alistair23 would it be ok to contribute your work to the main repository?

Fine with me

nicorusti commented 2 weeks ago

@alistair23 I have been running this for a couple of days, and I notice an issue with your control algorithm that is using instant power consumption to estimate remaining power for the day ( introduced in 0220d251123bcf6010643aa653c75326fb49db1a) :

Basically this triggers the appliance to turn on as soon as there is a sudden consumption peak, that causes remaining_power to go down, while avg_excess_power stays positive. Then appliance stays on as soon as it can be powered in with some solar energy, and then turn off as soon as there is another peak:
load

I might try using a better metric, maybe average daily power consumption, or average from the last x hours. Let me know if you see the same issue and if you have some ideas

alistair23 commented 1 week ago

I might try using a better metric, maybe average daily power consumption, or average from the last x hours. Let me know if you see the same issue and if you have some ideas

Ah, good point. An average of the last x hours seems like the best bet