Automations fails to run sometimes

I have a eWeLink zbridge which has Temp sensors connecting to it. The zbridge is connected to the wifi.

I also have TPLink Smart Plugs where Heaters are connected to it.

I’m using the SmartThings app on a android device and managed to link my TPLink account and eWeLink accounts to the app.

All devices are detected and able to show status\monitoring\details etc.

I have created a simple automation as follows


** IF

Between 18:00 - 23:00 (Precondition)

Temperature sensor is Equal to or below 20 degrees

** THEN

Turn ON Heater


Now my problem is that it works sometimes and sometimes fails to work at all.

I tried deleting and re-creating the automations and still hasn’t made much difference.

Is there anything wrong I’m doing or do I need anything additional for my setup.

Two thoughts:

  1. The time period is a pre-condition in the terminology of Routines. This basically means it will affect when the Routine can execute but doesn’t itself cause it to execute. So nothing happens at 18:00 just because that is the start of the period. Nothing can happen until a temperature event occurs after 18:00 and typically that means the temperature has changed.

  2. Although the condition will be true if the temperature is equal or lower than 20C it seems that Routines have been written to only trigger when the condition changes from false to true. So you need the temperature to drop from above 20C to below 20C after 18:00.

The usual workaround for this is to add an extra Routine that runs at 18:00 to turn the heater on then if needed.

1 Like

Many thanks Graham, I’ll give this a go…

So currently there is an off command where if temp reach 22C then heater turns off.

If I was to do this work around then lets take this scenario:


*** IF

at 18:00

Temp is <= 20C

*** THEN = Heater Turns ON.

*** IF

Temp is >= 22C

*** THEN = Heater Turns OFF.


when it get to 20:00 the heater turns Off as it has reached 22C

When its 22:00 its back to 20C but heater wont tun on unless there’s an automation command at 22:00

Does this mean I have to create a task to check every hour to see if temp is 20C to take action?

For example:


*** IF

at 18:00

Temp is <= 20C

*** THEN = Heater Turns ON.

*** IF

at 19:00

Temp is <= 20C

*** THEN = Heater Turns ON.

*** IF

at 20:00

Temp is <= 20C

*** THEN = Heater Turns ON.

*** IF

at 21:00

Temp is <= 20C

*** THEN = Heater Turns ON.

*** IF

Temp is >= 22C

*** THEN = Heater Turns OFF.


if above is right, then I don’t mind doing this?

Or do I use the 18:00 trigger to turn ON at 20C or lower as well as another trigger which has a time variable of between (18:00 - 23:00) eg:


*** IF

at 18:00

Temp is <= 20C

*** THEN = Heater Turns ON.

*** IF

at 18:00 - 23:00

Temp is <= 20C

*** THEN = Heater Turns ON.

*** IF

Temp is >= 22C

*** THEN = Heater Turns OFF.


Many thanks for your advice

I think it is this one I was suggesting.

I believe the original piston would actually have turned on the heater any time the temperature fell from > 20 to <= 20 from 18:00 to 23:00.

However if the temperature was already <= 20 at 18:00 the heater wouldn’t turn on so something had to set the initial conditions

1 Like