Help with a water heater rule

Hi all,

I would like to create a rule that monitors my water heater mode. If it switches to High Demand, I want to switch it back to Heat Pump after 30 minutes. How can I do that?

Device Attributes
Screen Shot 2020-03-20 at 8.30.19 PM

Here is a very basic rule. You would replace 'emergency heat' with 'High Demand' and 'heat' with 'Heat Pump'.

You may want to add some additional logic to this. For example change the trigger to 'changed' and then check if the mode changed to something else prior to the 30 minutes and cancel changing to 'Heat Pump' in that case. In my example the mode will always change to 'Heat Pump' after 30 minutes even if the mode was changed to something else within that timeframe. That may not be what you always want to happen.


I've never looked at a hot water heater, but something like

Rule machine

Thermostat mode changed

If mode is high demand
Set mode to heat pump delay 30 minutes cancellable
Cancel delay
End if

My issue is when I try to use thermostat mode, I don’t have the right options to select. They are more traditional to a thermostat.

1 Like

Use custom attribute.


Try looking under custom attribute for the Trigger.

1 Like

I see you have selected custom attributes, but it appears your driver is missing the modes you need.


Driver Code

looking at the code heat is heat pump, emergency heat is is emergency heat. So for heat pump select heat, and you should be ok.

Does the parent app give you the state of the device?

I don’t see anything in the parent app.
The current variables come from the device page.

There is a bug that is being fixed in Rule Machine for it to use what is published in the supportedThermostatModes attribute to populate the selection for that attribute in Rule Machine. Currently it only uses the default ones and doesn't use anything custom that has been published for the device.

So, if your driver is supposed to use High Demand as a custom mode, then it will not be visible currently. However, I don't see anywhere in the driver that publishes that attribute for custom attributes. I believe it using Emergency Heat sometimes and High Demand others. Do you have an event listing where it went into High Demand mode?

1 Like

I'm not seeing anywhere in the driver or the app where it will send an event for "supportedThermostatModes", which is critical for knowing what the modes possible are. The driver can still set it to that, but apps won't know that this is a possible mode without that event being published.

Interesting, I wonder if @brianspranger has run into this before.

Maybe this is why I can't get it to connect to Google Home...

I have been troubleshooting that did so long. I even tried to ask for help in a thread but I was ignored.

Do you have more details? If so, I will add it.

Here are the modes and states that a thermostat would support in Hubitat
Then you have to send an event if you change
Sendevent(data goes here)

Here are the modes it supports:

Not sure if that helps. According to the documentation posted here, this needs added to the attributes:
supportedThermostatModes - ENUM ["auto", "off", "heat", "emergency heat", "cool"]

That list should include High Demand, Electric Energy Saver and Heat Pump, shouldn't it?

So, I added some more code to add these variables.

Upon adding it to Google Home I still get this error:

app:8502020-03-22 09:43:26.785 pm warnThe following devices are not supported by Google Home and will be removed from your device list:[Water Heater]

These are my states now:

Current States

  • heatingSetpoint : 110.0
  • temperature : 110
  • thermostatMode : Heat Pump Only
  • thermostatOperatingState : idle
  • thermostatSetpoint : 110
  • supportedThermostatModes : [auto, off, heat, emergency heat]
  • lowerTemp : 91
  • ambientTemp : 72
  • supportedThermostatFanModes : [on, auto]

Update - I am making some progress. Once I get this updated I will post new code.

1 Like