Virtual switch with auto revert option
Posted: Monday 11 January 2016 9:10
Hej Folks,
I do have maybe a dump question, but I couldn't found any solution / workaround for my problem.
1. I have a dummy switch which is called Laundry (means, if laundry is in the room, we enable the switch "Entfeuchter" so dehumidifier is switched ON for 6 hours only)
2. the Main switch Laundry should also revert back after 6h, but this is not working as the Switch is On (seems like double set ON is not working)
Problem, this script or even with Blockly the dehumidifiers switch is switched off after 6h, but the device Laundry itself is still ON, so after 6h again the dehumidifiers will be started for next 6h.
It would be nice to get a feature for on time click switch (if switch is on, revert back to off in 6h, like in the Lua script below, which is not working)
I do have maybe a dump question, but I couldn't found any solution / workaround for my problem.
1. I have a dummy switch which is called Laundry (means, if laundry is in the room, we enable the switch "Entfeuchter" so dehumidifier is switched ON for 6 hours only)
2. the Main switch Laundry should also revert back after 6h, but this is not working as the Switch is On (seems like double set ON is not working)
Problem, this script or even with Blockly the dehumidifiers switch is switched off after 6h, but the device Laundry itself is still ON, so after 6h again the dehumidifiers will be started for next 6h.
It would be nice to get a feature for on time click switch (if switch is on, revert back to off in 6h, like in the Lua script below, which is not working)
Code: Select all
commandArray = {}
if (devicechanged['Laundry'] == 'On' and otherdevices['Entfeuchter'] == 'Off') then
print('Waescheprogram wurde gestartet fuer 6 Stunden')
commandArray['Laundry']='On FOR 360'
commandArray['Entfeuchter']='On FOR 360'
end
return commandArray