I share with you a blueprint to control electric appliances that can be switched at any time (like boilers, heaters, pool treatment plants, …) based on scheduling and solar electricity production in Home Assistant.
Functions:
Switch on and off the appliance based on scheduling.
Switch on and off the appliance based on solar panels electricity production and house consumption.
Switch off the appliance when electricity is imported.
Switch on the appliance when exported electricity is enough to feed the appliance.
Configurable hysteresis behaviour to avoid continuos switching.
I have just set this up, so no real feedback/data on its effectiveness yet. My only comment is that requiring the Active power of home (possitive: export, negative: import) may be limiting to some. For example, I have a Fronius solar inverter and the it displays the data as positive as input to house from the grid and negative as exporting excess solar to the grid.
I have worked around this because I already had a template sensor to show only the exported power as a positive and drop any imported power as a zero. Hopefully this will work with the blueprint.
Also, it would be nice to instead of using a timer to set the maximum on daily on time (as I have found these really unreliable if HA was to reboot), but a set slider (like what is in place for the minimum daily on time for cloudy days). We are already capturing the daily ON time in the required sensor, so why not just use that as the trigger to turn the appliance off?
Instead of zero, use a variable. For example I changed my automation to -300
I want to run the AC even if I draw some power form the grid.
But it would be nice to have a variable for each device - how much power is allowed to draw from the grid.
When you have cloudy days it’s still efficient to use part of the solar to heat up stuff, even if you draw a smaller amount of power from the grid
an additonal ideea: witch off when active power is lower than xxx W for more than… yy seconds
so that if a small clout covers the sun, the system won’t trigger turning off immediately
Just found your nice blueprint. I tried to use it as solution for my automation. I want to higher the hot water temperature from my heating when I have enough electrical input from my photovoltaik. Unfortunately I can only us a switch to control and not high or lower a value. Might it be an Idea for an additional feature?