Page 1 of 1

Selector switch: trying to get forMin() working

Posted: Monday 11 May 2020 13:41
by Number8
Hello
A button triggers a dzVents script that sets for x minutes a selector switch to level HG. Initial state of the selector switch is Off (level 0).

Code: Select all

dz.devices(383).switchSelector('HG').forMin(1)
After the button is pushed, the selector switch is set to the expected level. After one minutes domoticz logs

Code: Select all

2020-05-11 13:34:51.913 (Dummy) Light/Switch (Sèche serviette)
Sèche serviette is the selectorSwitch 383, but it does not return to the Off state. What I'm not understanding?
dzVents 3.0.4

Re: Selector switch: trying to get forMin() working  [Solved]

Posted: Monday 11 May 2020 14:04
by waaren
Number8 wrote: Monday 11 May 2020 13:41 A button triggers a dzVents script that sets for x minutes a selector switch to level HG. Initial state of the selector switch is Off (level 0).
but it does not return to the Off state.
The forMin, forSec, forHour options are not available for the switchSelector method. dzVents cannot know where to switch back to.
For this case use

Code: Select all

dz.devices(383).switchSelector('HG')
dz.devices(383).switchSelector('Off').afterSec(60)

Re: Selector switch: trying to get forMin() working

Posted: Monday 11 May 2020 15:57
by Number8
Thanks