Announcement

Collapse
No announcement yet.

Buttons and Dropdowns

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

    Buttons and Dropdowns

    I posted this as an issue on GitHub, but I thought I'd see if anyone has run into this...

    I have a lighting device with an On/Off/Toggle where I just want buttons.
    The same device can also be dimmed and brightened, so I want a dropdown.
    When I build my buttons with their EControlUse of off/on, those values are being added to the dropdown by the SDK for some reason.
    Also, the Toggle button is not displayed at all.
    Anyone see anything wrong with this code?
    Click image for larger version

Name:	screenshot3.png
Views:	94
Size:	321.9 KB
ID:	1554611

    HS4Pro Running on a Raspberry Pi4
    72 Z-Wave Nodes, 111 Events, 422 Devices
    Z-Wave, UPB, WiFi
    Plugins: EasyTrigger, weatherXML, OMNI, Z-Wave, Tuya, Device History
    HSTouch Clients: 3 Android, 1 Joggler

    #2
    The comments for the EControlType.Values enum says:
    All HomeSeer.PluginSdk.Devices.Controls.StatusControls set as HomeSeer.PluginSdk.Devices.Controls.EControlType.Values are collected and displayed together as a single select list.
    That's what you are getting I guess.

    There's more for EControlType.TextSelectList:
    Multiple HomeSeer.PluginSdk.Devices.Controls.EControlType.TextSelectL ist controls are used when a unique value needs to be defined for the different options that can be selected. This is useful for integration with 3rd-party systems where an analysis of the selected string is not possible.
    Which I'm struggling to comprehend, can HST write a bit more useful docs? And there's no example of these in the Sample plugin. What a pain.

    Comment


      #3
      Thanks Alex - I knew you would be able to explain it...

      I'm basically trying to replicate what HS is doing for one of their own switches, but with a dropdown instead of a slider:

      Click image for larger version

Name:	screenshot1.png
Views:	57
Size:	69.4 KB
ID:	1554710

      I'll post back if I can make it work. I agree, there should be some more 'meat' in the docs. It's all trial-and-error right now.

      Thanks
      Rob



      HS4Pro Running on a Raspberry Pi4
      72 Z-Wave Nodes, 111 Events, 422 Devices
      Z-Wave, UPB, WiFi
      Plugins: EasyTrigger, weatherXML, OMNI, Z-Wave, Tuya, Device History
      HSTouch Clients: 3 Android, 1 Joggler

      Comment

      Working...
      X