Nest hot water automation

Hi.
This is my first post so be gentle.
As the Nest integration doesn’t have hot water control, I am trying to do it with HA.
I am running HA on a pi4. I have a pi zero reading the hot water temperature in my hot water tank and sending the temperature to HA by MQTT. I also have a 4 channel relay to switch on the heating to boost the hot water.
I am trying to add a card to Lovelace that will allow me to click and boost the hot water which will set 2 of the relays to high. I am struggling to find a way to have a card in Lovelace that will boost the hot water for a set time. I normally boost the hot water for 30min but would like the option to select the time.
I have the relays switching individually but they are just on off buttons.

Once I hopefully get this done, I plan to try automate the process where HA will check the water temperature and boost it if needed then check the temperature again later to check it heated.

I might be getting ambitious considering how new I am to this but, aim high, right.
I figure the button is the easiest to start with and automate with the lessons I learn from that.

Any help is very much appreciated.

Sounds like a generic thermostat is what you are looking for.

Hi Cyn,

Thanks for the idea.

I looked at the generic thermostat but I don’t know how I can implement it to set a boost timer.
I am not really concerned about the temperature of the hot water but more so that I can boost it for 30 minutes or so. Basically once it’s over 45 degrees when I get up in the morning, it’s good. I also have solar panels for the water so most of the limited sunny days we have here, it’s not needed. Once I get over the boost hurdle, I will no longer need the Nest app since I can do it all through HA. When I get to automating it, it will hopefully be set and forget.

Do you have any other ideas that might give me some inspiration. Please bear in mind, I am just getting started with HA and coding etc.

There are always multiple ways of doing things in Home Assistant. Since you already have a temperature sensor and a switch set up all you really need are 2 small automations. Start small & easy, based on time trigger turn the heater on and off.

Say at 7am turn on the switch and at 7:30 turn it off. Then you probably want to add a condition to the on automation to see if the water is already over 45. That way it doesn’t turn on if it doesn’t need to. Add a second trigger to the off automation, this way the heater is turned off when the temp gets to 45 or 7:30.

If you set up a generic t-stat you still need 2 automation but you turn the t-stat on & off based on time. Then it handles the temperature testing for you.

After you get the automations working, I would set up datetime & temperature as helpers so that you can change them in the UI instead of going into the code.

Hope this helps get you started.

Mine’s done with a boost input_boolean, switched on and off via a Lovelace switch (top switch in screenshot below).

When boost is turned on, the appropriate relay is switched on. When the hot water reaches the target, an automation turns off the boost and the relay. You could (although I don’t) have another automation that detects when the boost has been switched from off to on for 30 minutes (or whatever) and then turn it off [see docs].

In my case, this is overlaid on a scheduled target across the day, and gets a bit complicated :crazy_face:.

Based on the response and ideas received, I have it working. I have an input Boolean that starts the timer to boost the hot water that also cancels the timer when pressed again. I went a bit more fancy and now have the automation working that boosts automatically at 2100 if the temperature is low. It also sends me a notification when it runs. Thanks for the help to get it working.

There is one thing I am struggling with. I have the automation working and it notifies me when the conditions are met and the automation runs. I am trying to figure out how to set a condition to notify me when the automation does not run because not all conditions are met.

Is there a way to set it up so if the conditions are met, continue and if not met, send a notification?

I figured it out. I used choose in the automation to notify when the conditions are not met.