Why is this not working?

Hi all,

I have wired in a zigbee relay to my underfloor heating to be able to regulate it with a temp sensor that I've positioned under the sofa on the floor.
The way it was previously set up is by way of a wired-in thermostat which was in the completely wrong place (very cold hallway) so it would basically always be on as the thermostat never reached it's shut-off point.

I've set up a virtual switch to regulate the zigbee switch so that when we turn on the underfloor heating, it will turn the zigbee switch on and off depending on whether a certain temp has been reached... at least that's what is supposed to happen...
Unfortunately it only works to some extent. It correctly triggers the heating to turn on once I turn on the virtual switch when the temp is too low. It also correctly turns off the zigbee switch when the temp is reached. But when the temp then drops below the set point, it doesn't then re-activate the zigbee switch again :woozy_face:

This is the rule:

It looks perfectly fine and logical to me but I'm hoping that someone here can poke a hole in it and reveal the obvious thing I'm overlooking for some reason?

1 Like

The rule could be simplified and it should work if changed to:

Required Expression: Time berween 6am and 12am

Trigger: Temperature of Living Room Sofa < 20

On: Underfloor Heating Switch
Wait for condition: Temperature of Living Room Sofa > 25
Off: Underfloor Heating Switch

I'm not exactly following your set up so I may be off.

Required expression virtual switch on

Trigger temperature changes


If temp < 20
Heat on
Heat Off
End if


You'll want another rule to turn the virtual switch off at midnight

Actually, I'd make two rules, one triggers on temp < 20 and the second triggers on temp > 20. A single temp changes rule would trigger unnecessarily often.

Many ways to skin a cat apparently :smiley:

I wasn't familiar with the "required expression" so thx for that, I'll give that a go.

@Sebastien your proposed solution does not take into account the virtual switch. The reason I want that is that it's excessively expensive to run the underfloor heating so I only want to invoke the rule when needed. From how I interpret your proposed rule, I wouldn't have a way to control when I want to run the heating and it would be temperature dependent only.

@ChrisP that looks like it might work and is pretty straight forward and easy to set up. The only thing I'll want to add on top of that is some delay as I don't want the zigbee heating switch to turn on/off constantly when the temp is hovering around the 20 mark.
Oh and I've noticed in your follow up post just now that you're mentioning exactly that :smiley:
I'd just introduce the delay instead of making two separate rules as a way around that I think.

I'll give it a go now and report back. Thx for the assist guys!!


You can put more than one condition in the required expression and and them.

So you could group the time requirement there AND the status of you virtual switch.

Yes there are so many ways to do anything with HE. Just find a way you like and that makes sense to you !


In the temp trigger there is a "and stays" switch where you can specify a "stays that way" time.

1 Like

It's working beautifully guys!! Thx so much for this.
I hadn't used RM in quite a while and it's vastly improved from the early days so wasn't aware of some of the functionality such as the required expression and had never bothered clicking on it.

Learned a lot and has got me motivated to set up some extra stuff as well.
Thx again!