I am looking for suggestions on how to implement LHS of a rule so the RHS would be triggered only when the value of the sensor in the LHS changes from zero to something else. Application is plug-in power monitor and I want to trigger RHS only when the wattage changes from zero to anything I.e when the appliance plugged in to it turns on.
Currently I am using source == "sensor", value > 0
This triggers the RHS every time wattage changes ( appliance plugged in to it is a washing machine and value keeps wattage changes very frequently during the wash cycle)
Yes, this is a way to go. Create an in-memory varaiable with status on/off. Set this status with power >0 and ==0. Execute your RHS logic on the in-memory variable changes.