I have created this as test:
But it is not working?? When i turn a switch On or Off nothing happends.
Is this detection system broken?
Moderator: leecollings
Code: Select all
if (otherdevices['Tel1'] == 'On' or otherdevices['Tel2'] == 'On') then
TelAanwezig = true
end
if (otherdevices['SomeoneHomeActief'] == 'On' and otherdevices['IemandThuis'] == 'Off' and TelAanwezig == true) then
print("SomeoneHomeActief staat aan en IemandThuis is off en een van de telefoons is verbonden met wifi dus zet IemandThuis On")
commandArray['IemandThuis']='Set Level: 10'
end
if (otherdevices['SomeoneHomeActief'] == 'On' and otherdevices['IemandThuis'] == 'On' and TelAanwezig == false) then
print("SomeoneHomeActief staat aan en IemandThuis is On en geen telefoons verbonden met wifi dus zet IemandThuis Off")
commandArray['IemandThuis']='Set Level: 0'
end
end
Users browsing this forum: No registered users and 1 guest