Announcement

Collapse
No announcement yet.

scripting help

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

  • scripting help

    Can anyone see what is wrong with this script line:

    &if hs.DeviceValue "z1" <> 0 then hs.TriggerEvent "Restart the router & modem"

    I keep getting a syntax error.

    Thx.

  • #2
    Try

    &if hs.DeviceValue("z1") <> 0 then hs.TriggerEvent "Restart the router & modem"

    and I am going to say that this is in HS2 yes? If it is in HS3 hs.devicevalue expects a device reference not a code/address.
    My Plugins:

    Pushover 3P | DoorBird 3P | Current Cost 3P | Velleman K8055 3P | LAMetric 3P | Garadget 3P | Hive 3P |
    Yeelight 3P | Nanoleaf 3P

    Comment


    • #3
      wow!

      Yup, hs2

      That was it. thx.

      I thought for sure I tried that. O well, must be my old age.

      Thx again.

      Comment


      • #4
        docs

        Sure wish the documentation was more clear, maybe some examples...

        Comment


        • #5
          You can run a conditional script like that? Cool.
          Don

          Comment

          Working...
          X