Announcement

Collapse
No announcement yet.

How can I trigger an event when switch is in that state already ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How can I trigger an event when switch is in that state already ?

    I using a virtual switch to turn on my TV. I use Alexa to turn on a virtual switch called Television, which then triggers a series of IR and other commands, then turns the switch off again.
    I want to now be able to use a turn off Television to trigger another event, but that would send a 'off' command to the switch which is already off. Can that be done ?

    #2
    IF: "This device had its value set to..."

    (as opposed to one of the conditions that has the word "change")

    Comment


      #3
      Originally posted by garyd9 View Post
      IF: "This device had its value set to..."
      I don't think that will be so easy, because that switch is turned off right after the TV is turned on, so that trigger might just turn the TV off again immediately.

      I'm not sure why the virtual switch needs to be turned off after the TV is turned on, though. Why not just let it shadow the state of the TV? Then you could use it as Gary suggests.
      Mike____________________________________________________________ __________________
      HS3 Pro Edition 3.0.0.548, NUC i3

      HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

      Comment


        #4
        The logic I see:

        Remove the final action turning off the virtual switch.

        That allows the above second requirement.

        Depending on your setup of your TV and whether or not you have a power device on it. I.e our TV will shut off after 3 hours as power saving kicks in another TV after 2 hours if no IR commands are received.

        Either
        Create an event based on TV turning off ... turns virtual switch off.

        Create an event based on a timer...

        Create a event based on schedule to...

        Comment


          #5
          Have you considered using Jon's alexa script. This would be so simple. Just create a trigger called "turn off Television " which would then run a script or event to do what you need.

          Robert
          HS3PRO 3.0.0.500 as a Fire Daemon service, Windows 2016 Server Std Intel Core i5 PC HTPC Slim SFF 4GB, 120GB SSD drive, WLG800, RFXCom, TI103,NetCam, UltraNetcam3, BLBackup, CurrentCost 3P Rain8Net, MCsSprinker, HSTouch, Ademco Security plugin/AD2USB, JowiHue, various Oregon Scientific temp/humidity sensors, Z-Net, Zsmoke, Aeron Labs micro switches, Amazon Echo Dots, WS+, WD+ ... on and on.

          Comment


            #6
            Originally posted by garyd9 View Post
            IF: "This device had its value set to..."

            (as opposed to one of the conditions that has the word "change")
            I was trying to overcomplicate things, had a few events changing the state of the virtual device according to the state of the real device, and the other way round and it wasnt working properly. Far too complicated. Sometimes the easy way (above) is just too obvious. I looked at it first of all and didnt think it would work. It does, so problem solved...

            Comment

            Working...
            X