Automation not triggering consistently

I am new to HA but have so far found things fairly straightforward to set up, except for this problem. I have 2 simple automations set up to turn a Sonoff switch on or off when a Sonoff sensor hits a certain low or high temperature. I find that the automation trigger for low temperature is inconsistent, but have not noticed problems with the one for high temp (both use the same sensor and switch). Sometimes when the temperature drops below the threshold, the action is triggered and sometimes it isn’t, and I haven’t been able to discern a pattern to explain the inconsistency.

At one point it was working fine for several hours (triggering on and off based on temperature change), but when I changed the name of the sensor, it stopped triggering, although the device had come back online. This problem eventually resolved by itself, so the name change itself was not the problem. At another point, I found that after it went hours without triggering correctly, if I manually triggered the action to switch on, everything would start working again: back to the usual on/off cycling.

My equipment is: HA Green, ZBT-2 Zigbee interface, Sonoff SNZB-02P sensor and Sonoff S31 Zigbee switch. I am running HA OS 16.3 and HA Core 2025.11.3.

Hello cissor,

It would help if you could to provide some code so we can see what you’ve done so far… We won’t be able to help if all we have is ‘I want to do this thing with this other thing’.
It makes it much easier for us to offer constructive answers if you follow Community Guidelines #9. 11, & 14 by supplying a properly formatted configuration for the automation that you have attempted. Please share the YAML and any errors so we can see what you’ve done.