HomeSeer / Plugin-SDK

Plugin development kit for the 4th major edition of the HomeSeer platform.
https://www.nuget.org/packages/HomeSeer-PluginSDK/
GNU Affero General Public License v3.0
20 stars 4 forks source link

TextSelectList Engulfs All Rendered EControlType #89

Open mcsSolutions opened 4 years ago

mcsSolutions commented 4 years ago

Version 4.0.4.0

A feature is created with Pair StatusControl of TextSelectList. In the same feature another Pair of any other EControlType (e.g. Slider) with a different value range is added. The /devices.html page will render a select list with options that include values for the second Pair. For a Slider it will include "(value)". For a Button it will be the text that is intended to be on the Button. These appear at the end of the options list.

When viewed from /deviceutility the proper rendering occurs wit separate controls for the TextSelectBox, Button, Slider etc.

The code to create the TextSelectList

    For i As enumActions = enumActions.Step_Increase_7 To enumActions.Step_Increase_1
        Dim Pair As New HomeSeer.PluginSdk.Devices.Controls.StatusControl(HomeSeer.PluginSdk.Devices.Controls.EControlType.TextSelectList) 'Dim Pair As New HomeSeerAPI.VSPair(vStatusControl)
        Pair.IsRange = False
        Pair.TargetValue = CType(i, Double)
        Pair.Label = "Step + " & (enumActions.Step_Increase_0 - i).ToString
        Pair.ControlUse = HomeSeer.PluginSdk.Devices.Controls.EControlUse.Dim
        hs.AddStatusControlToFeature(featureRef, Pair)
    Next

The code to create the example Slider

    Dim Pair As New HomeSeer.PluginSdk.Devices.Controls.StatusControl(HomeSeer.PluginSdk.Devices.Controls.EControlType.ValueRangeSlider)
    Pair.IsRange = True
    Dim Range As New HomeSeer.PluginSdk.Devices.ValueRange(0, iRange)
    Range.Prefix = ""
    Range.Suffix = "%"
    Pair.ControlUse = HomeSeer.PluginSdk.Devices.Controls.EControlUse.Dim
    Pair.TargetRange = Range
    hs.AddStatusControlToFeature(iRef, Pair)
spudwebb commented 3 years ago

logged as HS-1058

jldubz commented 2 years ago

Investigating for v4.2.8.0

rjhelmke commented 2 years ago

If this is still an issue, can you include a devices.json that has a device configured that shows the issue?

mcsSolutions commented 2 years ago

Attached is the code segment that adds a selector and slider to an existing plugin device feature ref 874 of device 873. Screenshots and the requested devices.json. This was done with 4.2.8.0

From: Rich Hemke @.> Sent: Thursday, March 10, 2022 12:13 PM To: HomeSeer/Plugin-SDK @.> Cc: mcsSolutions @.>; Author @.> Subject: Re: [HomeSeer/Plugin-SDK] TextSelectList Engulfs All Rendered EControlType (#89)

If this is still an issue, can you include a devices.json that has a device configured that shows the issue?

— Reply to this email directly, view it on GitHub https://github.com/HomeSeer/Plugin-SDK/issues/89#issuecomment-1064461534 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AALJP67TRVHWIZQQ4CUT2ZTU7JJTFANCNFSM4MFSTLAQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AALJP6YPU5GDMD6I3HRNTNLU7JJTFA5CNFSM4MFSTLA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOH5ZGJXQ.gif Message ID: @. @.> >