Lua text sensor trim devicechange text to last digits
Posted: Sunday 10 January 2021 8:06
Hi all,
With arduino I am sending in to domoticz some data to TEXT sensor.
I am using the following code to trigger if text sensor has some changes. ( rewriting the code now )
I need just a piece of that information, lets say the last x digits. = 10000001
Any ideas how to trim the sensorLogRF device ?
asterisk, wildcard - would be a perfect solution...but thats not working here.
Any idas to try?
With arduino I am sending in to domoticz some data to TEXT sensor.
I am using the following code to trigger if text sensor has some changes. ( rewriting the code now )
Code: Select all
if (devicechanged[sensorLogRF] == "[22:51:48] 610ecc_10000001") then
if (otherdevices['Switch'] == 'Off') then
commandArray[getdevname4idx(4)] = "On"
end
if (otherdevices['Switch'] == 'On') then
commandArray[getdevname4idx(4)] = "Off"
end
print("Rem1")
end
Any ideas how to trim the sensorLogRF device ?
Code: Select all
if (devicechanged[sensorLogRF] == "*10000001") then
Any idas to try?