Solar controlled appliance

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.
  • Minimum daily scheduled on time for cloudy days.
  • Maximum daily on time (optional).
  • Holidays mode.
  • Safeguard functional mode for cloudy days.

You can find the code here.

I hope somebody find it useful and enjoy it.

Any comments are welcome.

2 Likes

Could you also allow binary_sensor and not just input_boolean?

I have high hopes for your blueprint, but I can’t test it at the moment. But I’m looking forward to it.

I’ve added binary_sensor as inputs in addition to input_boolean.

Your feedback will be very welcome.

Hi,

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?

Thanks
David

you can configure a helper - template like this, to invert the import/export

{{ -1 * states('sensor.power_meter_active_power') | float(0) }}

Thankyou, very helpful. I have used your template and now it appears to be working well.

Will keep an eye on this over the next few days, but this is exactly the kind of automation I needed.

@miguelpucela I would add another variable here:

    - if:
      - condition: numeric_state
        entity_id: !input active_power
        below: 0

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?