check on changed uservariable

Moderator: leecollings

Post Reply
manjh
Posts: 729
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

check on changed uservariable

Post by manjh »

For a changed deviced, there is a special table (devicechanged).
Is there something similar for a changed uservariable?
Hans
User avatar
waltervl
Posts: 5374
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: check on changed uservariable

Post by waltervl »

Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
manjh
Posts: 729
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: check on changed uservariable

Post by manjh »

I used that in:

Code: Select all

for variableName,variableValue in pairs(uservariablechanged) do

But I am looking for a specific variable, so would like to do:

Code: Select all

if uservariablechanged["NFCvalue"] then

Unfortunately that does not work.

It's not a big deal, chances are there will not be more than onevariable changing at any one time, so I would be running through a table of one anyway.
Guess I'll stick to the first method.
Hans
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 0 guests