Documentation: Extend explanation for Device Object attribute "changed"

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
DzJan
Posts: 4
Joined: Wednesday 04 October 2017 21:57
Target OS: NAS (Synology & others)
Domoticz version: 3.8153
Contact:

Documentation: Extend explanation for Device Object attribute "changed"

Post by DzJan »

I think the documentation could use some extra text for what is considered "the device was changed"

Luckely it does not only seems to be a state change, but also a last seen (like for a one button "On" switch), but what else
Synology NAS DS411+
Mega 2560 PRO, Mini RFLink R47
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: Documentation: Extend explanation for Device Object attribute "changed"

Post by dannybloe »

You are right.. That attribute is actually not really useful (anymore). If you have a script that is triggered due to a device change (like a switch or sensor) then inside your execute function that device will have changed == true. All other devices will have change == false. You could use that if you want to iterate through all device to see which one has been changed. But that is always only the device being triggered and you already have that device as the second parameter to your execute function.
So yeah, maybe we should just hide that from the documentation all together.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest