You can create that already if i am not mistaken.
Something like MyDevices = ('device1' and 'device2' and 'device3')
I am not sure if that is correct but it should be something like that.
Then you can call MyDevice in your script i think.
Haringstad wrote: ↑Tuesday 15 August 2017 9:26
First of all, I am not a programmer, and I have some difficulties in creating scripts that use these options:
Maybe it needs a bit more explaning. With the use of the internal pinger of Domoticz, I check if certain devices are "Alive" within the network. If they are, that "Device Switch" gets switched on. Good! So, I do see a lot of switches flipping from off, to on, when I enter the house. But I am not the only person, so more devices are in the "detection" list.
If *any of those* is detected to be switched "On", flip the "Master switch: Someone at Home".
But if *all of those* are "Off", then you can set the Master switch to "off". (Or trigger the alarm to be turned on, or what you like...)
So, to make it compact, and keep it fast, that is why I had this question.....
I think I understand what you mean. And what about to create function, which gets arguments: device list, how check (any / all), what check (On / Off) ?
Then in this function, make some iteration, check logic, etc. ?
Now I don't know how exactly to do it, just shallowly thinking
if ((phonemiguelstatus == 'On') or (phoneedastatus == 'On') or (macmiguelstatus == 'On')) and date.hour < 22 and date.hour > 6 and otherdevices['Kitchen - Router'] == 'Off' then
Replace or with and so that all devices must be On to set a switch.
This is from the wiki -> smart lua scripts.
Guys! THANKS! It gives me some new points of view, and I will give it a shot!
And @dannybloe, again: I am not a real programmer, so I try my best, and hope that others can help me out.... A joke: 88-2 Generaal Spoor Kazerne, 11 Pagncie, 2e Pel, Charly Group.