Author Topic: Force turn on/off virtual switch  (Read 150 times)

gabayarden

  • Newbie
  • *
  • Posts: 8
  • Karma: +1/-0
Force turn on/off virtual switch
« on: February 11, 2017, 12:48:05 am »
I am using virtual switch for triggering scences for example:
A virtual switch that represent the TV.
When I turn off the switch the tv will turned off by a scene and the same for turn on.
The problem is when the tv was turned off manually but the switch is in on mode. Now I cant turn on the switch because its already in turn on mode so I need to do it manualy or to turn off then turn on the switch.
Hope you understand  ???
How do I force turn off the virtual switch even if the switch is in off mode?

gabayarden

  • Newbie
  • *
  • Posts: 8
  • Karma: +1/-0
Re: Force turn on/off virtual switch
« Reply #1 on: February 11, 2017, 04:53:45 am »
If any one will also face with this problem:
I added a new state to the virtual switch called "nothing"
then, in any mode switch (on/off) I am changing the switch to "nothing" and then I can switch it to ON or Off over and over again :)
Attached the new virtual switch files

Martin79

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: Force turn on/off virtual switch
« Reply #2 on: February 17, 2017, 08:32:20 am »
Hi,
this would be a great feature. but i got a problem to install it. i opened the json, copy the code, go to develop apps/ device simulator json, and paste the code. then i get invalid json error. do i have to add something to the code, or do something else?

Thank you