Announcement

Collapse
No announcement yet.

how can a read divice value bij script ??

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

    how can a read divice value bij script ??

    I like to read the value from a divice, a temp reading.
    lets say the temp reading of a divice r3 gets below 0 then......
    i like to do an action.
    like to disable a few events for example

    i only now how to handle on and off status .
    like.

    if hs.is0ff("r3") then hs.speak "it is cold"

    but how i handle value ??

    or is it not posible??

    #2
    if hs.deviceValue("R3") < 32 then hs.speak "it is cold"
    -Rupp
    sigpic

    Comment


      #3
      thanks it works,
      returs it only non decimal, it looks that way.
      or can it return one decimal value.
      like 0,5

      Comment


        #4
        Device values are integers. If the value is stored to preserve decimals, then it would have been multiplied (by 10 or 100, usually) before storing. If that were the case, then you'd see a number that is 10X or 100X what you are expecting, but you could recreate the decimal by backing out the multiplier.
        Mike____________________________________________________________ __________________
        HS3 Pro Edition 3.0.0.548, NUC i3

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

        Comment

        Working...
        X