Page 1 of 1

combine 2 switches inside one on/off

Posted: Wednesday 10 February 2016 11:49
by jeje77
Hello, :roll:

My electrical outlet needs to have 2 switches on my domoticz ... one to turn it on and one to turn it off ... :shock:
I would like if possible to combine this 2 switches inside one on/off ;)

I already try to create a script but for the way I found, my 2 switches have to stay where they are :cry:

=> I suggest (I think) that it can be good to have the possibility to combine the switches together.

thanks

Re: combine 2 switches inside one on/off

Posted: Friday 12 February 2016 23:41
by stlaha2007
Hi jeje77,

I think your half way...
One switch (domoticz way) can hold two different scripts (eventualy even one with parameter on or off if you like).

Another way, what comes to mind is the following. Domoticz devices can be hidden by naming them with a dollarsign as first character in there name.
So create new switch(or group) and call so to speak the hidden switch to turn it on and the other as off action.

I hope you understand what i mean and hopefully make you smile when that works :-)

Grtz,
Stephan

Re: combine 2 switches inside one on/off

Posted: Tuesday 16 February 2016 11:20
by jeje77
Thanks Stephan :D

Your second way work 8-)

Thanks for the tips "$" ..... that change everything ;)

Re: combine 2 switches inside one on/off

Posted: Friday 11 March 2016 13:57
by tonse
How can i "call" a hidden switch?

Re: combine 2 switches inside one on/off

Posted: Friday 11 March 2016 14:35
by stlaha2007
Simple answer do a json call according to wiki as a script action.

i dont use hidden devices at the moment. All my devices are normally represented or triggering on/off action scripts.

Grtz,
Stephan

Re: combine 2 switches inside one on/off

Posted: Friday 11 March 2016 14:54
by jannl
You also can a an http json call to the on- and off action of a virtual switch, in this way you do not need to create a script

Re: combine 2 switches inside one on/off

Posted: Friday 11 March 2016 15:26
by bbqkees
Maybe you can use the new selector switch for this.