When posting code, please use the code tags ( selectable by the icon</>)
As posted earlier, use the conversion “as Number”!
rule “Heat Transfer Fan on/off”
when
Item Sonoff_TH16_3_temperature changed
then
if((Sonoff_TH16_3_temperature.state as Number)> 20){
SoPow1_SW_ON_OFF.sendCommand(ON)
}
end
When testing own rules, using the “logInfo” lines you can check wether the rule is run over that line or exited before and you can display the actual value of a variable, value or item.state.
Hi! I have setting a generic module with 2 switch and one relay.
Switch1 on relay 1 and switch 2 indipendent. She work, but when I turn off the server mqtt, relay 2 work on relay 1. Can you Help me!
Yes I have the mqtt server disabled. but the relay and the buttons are on the same esp. the ESP being a microcontroller should be able to act even without Mqtt server. I imagine that mqtt is indispensable when I have to reach a relay or a button on another esp.
So it has neither to do with Sonoff nor with creating a rule. You are better off with a new thread which should have nodeMCU and Tasmota in the topic. That way it may catch the eye of a person with knowledge in those topics.