I have made a dummy switch and the following script.
The script have to be switch the dummy switch ''AwayFromHome' ON when everyone is gone from home. (All the below devices have to be OFF)
The numbers are not IDX numbers, they are part of the real names as i named the switches.
Code: Select all
commandArray = {}
if (otherdevices['053-Samsung_TV'] == 'Off'
and otherdevices['057-Denon_Receiver'] == 'Off'
and otherdevices['021-MrEggHead'] == 'Off'
and otherdevices['022-JacolineSamsungS8'] == 'Off'
and otherdevices['023-SanneIphone8'] == 'Off'
and otherdevices['024-MarijkeSamsungS10'] == 'Off')
then
commandArray['AwayFromHome']='On'
print('Nobody is at Home at this Moment')
else
commandArray['AwayFromHome']='Off'
print('Somebody is at Home at this Moment')
end
return commandArray

after that, i switch my phone out for the wifi to get a trigger and hopely the 'AwayFromHome' switch goes on. (No it doesn't) what i'm doing wrong)
Thanks for advises
"Team Kleijn"
Rob