Announcement

Collapse
No announcement yet.

hs.SetDeviceValueByRef question

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

  • hs.SetDeviceValueByRef question

    Why doesn't this immediate script command change the dim level of a zwave light who's device reference is 29 to 50%?
    Attached Files
    If it ain't broke, don't fix it!

  • #2
    The Z-Wave plugin does not necessarily know that it's value has been changed so you can change it to whatever you want and it will do nothing, the correct method is to call the requisite CAPI function for the dim level.
    My Plugins:

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

    Comment


    • #3
      Thanks MrHappy.

      Didn't realize is was so much trouble to change a zwave dim level. Here's a snippet of what ended up as a script instead of a single line of code.

      Dim objCAPIControl As CAPIControl
      objCAPIControl = hs.CAPIGetSingleControlByUse(Convert.ToInt32(dRef), ePairControlUse._Dim)
      If objCAPIControl IsNot Nothing Then
      objCAPIControl.ControlValue = myValue
      hs.CAPIControlHandler(objCAPIControl)
      End If
      If it ain't broke, don't fix it!

      Comment

      Working...
      X