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:	152
Size:	321.9 KB
ID:	1554611

    HS4Pro on a Raspberry Pi4
    54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
    Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

    HSTouch Clients: 1 Android

    #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:	117
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 on a Raspberry Pi4
      54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
      Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

      HSTouch Clients: 1 Android

      Comment

      Working...
      X