This was exactly the reason why I started with HASS in the first place and did manage it to solve it using 2 automations, some sensors and a helper. My goal was to turn on the AC automatically if I have more than 1kW of power delivery to grid and then turn it off automatically when the grid power gets lower. I also did not want it to turn off automatically when I turned it on manually. Below my solution:
So the “input_boolean.airco_an_auto” is my helper detecting if it was turned on manually or not.
sensor.solar_grid_power is my power delivery to grid in kW
I use following sensor definition in my sensors.yaml. I had to convert the SolarEdge Sensor to numeric value:
Of course I could also have used the value template definition within the automation somewhere, but this seems cleaner to me.
With this combination it all works as it should…
This is a very similar setup to what I want to be able to do, turning on a pump when solar is high, also I am in an off-grid house so I have a generator backup.
little extra help for me, please.
I don’t have a Home Assistant set up yet, so a steep learning curve coming.
What physical sensors do I need to buy to allow the HA to measure solar power?
Also would love to include an option to leave the pump on if the generator is supplying power, what physical sensor would be recommended for this?
Since I don’t know what kind of pump is it, how is connected, if you have access to the electrical connection or if you are willing to integrate a relay on the electrical connection here are a few options:
Depending on your setup/proximity/wiring you can use the same device (Shelly EM) since it has an integrated relay (up tp 2Amps) … but that depends on how you control the pump.
If you need a dry contact relay / separate device to control the pump you can use Shelly 1
If you need a 110-230V, 16A relay with power monitoring you can use Shelly 1PM
If you don’t want to mess with the electrical connection and operating the pump is as easy as plugging it in you can use Shelly smart plugs, depending on there you live, here are 2 options: EU or US
Going with any Shelly device, integrated in Home Assistant via MQTT, setup is the same and no soldering is required to make them work locally. Those devices are more expensive than Tuya but more reliable and a lot easier/faster to integrate.
I’m in Australia and the local guys I have seen were not listing the Shelly EM.
I have some vague idea I could wire up the Shelly 1PM to the house batteries, not to actually control anything, but just as a way of getting a reading of current voltage.
Ciao, ho trovato molto interessante la tua soluzione, provo a fare la stessa cosa, ho il fotovoltaico e
i condizionatori quale unica fonte di riscaldamento, vorrei automatizzarli. Sono nuova di Home Assistant e sto prendendo ora un po’ di confidenza. Ho copiato il tuo codice modificando le voci id condizionatori mettendo i miei nomi e valori, funziona l’accensione e lo spegnimento se do io il comando esegui, ma non vedo accadere nulla in riferimento al solare. Ovviamente ho modificato il nome del sensore che legge la produzione solare inserendo il mio e variando il numero riferito ai Kw, che da me è comunicato in Watt. Non so però quale id mettere al posto del tuo riferito ad Airco-an ed Airco-aus, sempre se devo cambiarli. Posso chiederti consiglio per favore? Ti ringrazio tanto in anticipo
Aggiornamento:
Sembra funzionare, stamane il condizionatore si è acceso da solo. Ho spento poi manualmente, si è riacceso una volta e poi non più…
?
Comunque grazie mille per la tua soluzione semplice e pulita…