Announcement

Collapse
No announcement yet.

Turn off device using variable

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

    Turn off device using variable

    I can't come with a solution for the life of me. Any help would be much appreciated!

    I have a device ("a1") turning on - let's say at 7am.

    A virtual device ("v1") holds a minute value - anywhere from 5 minutes to 30 minutes. This value changes periodically.

    I'd like for the device ("a1) that comes on at 7am to turn off X number of minutes later - whatever number of minutes are held in the virtual device ("v1").

    Any ideas how I could go about this?

    Thanks in advance!

    #2
    If you don't want to use the built in HS stuff you can start by having a look at this script and modifying it to your needs:

    http://board.homeseer.com/showpost.p...83&postcount=3
    - Pete

    Auto mator
    Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb

    HS4 Pro - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
    HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

    X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

    Comment


      #3
      I haven't tested this, but I think it would work.
      Create an event to turn A1 off. I'll call it "TurnOffA1".
      Then add an immediate script action to your event that turns A1 on, with the script statement:
      &hs.DelayTrigger hs.DeviceValue("V1")*60, "TurnOffA1"
      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
        Turn off device using variable

        Thank you both for your replies. I tried Michael's first and it worked great.

        I may find lots of other places to use this now.

        Thanks!



        Sent using Tapatalk HD

        Comment

        Working...
        X