Sensor text compare text
Posted: Tuesday 12 November 2019 13:02
Hello I have a text device that and updated I would like to know if he and possible the old with the new text as in the example I found no way to do it
Code: Select all
return {
on = { devices = { "Risque" }},
execute = function(dz, item )
if old.item.state == "RAS" and new.item.state == 'orage' then
notification
elseif old.item.state == "orage" and new.item.state == 'RAS' then
notification
end
end
}