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
21 stars 4 forks source link

Event will not save after creating feature #260

Open rmasonjr opened 2 years ago

rmasonjr commented 2 years ago

Environment and System Config

Describe the issue I am creating a Feature on a Root device using the following code: ff = FeatureFactory.CreateFeature(OMNI_NAME) ff.OnDevice(rootRef) ff.AsType(EFeatureType.Generic, EGenericFeatureSubType.Battery) ff.WithName("battery") ff.WithLocation(OMNI_NAME) ff.WithLocation2(OMNI_NAME) ff.WithDefaultValue(0) ff.AddGraphicForRange(g_imageFileLocation & "batteryDead_64.png", 0, 10.0, "Battery Dead") ff.AddGraphicForRange(g_imageFileLocation & "battery50_64.png", 10.01, 11.22, "Battery Less Than 50%") ff.AddGraphicForRange(g_imageFileLocation & "battery75_64.png", 11.23, 11.94, "Battery Less Than 75%") ff.AddGraphicForRange(g_imageFileLocation & "batteryFull_64.png", 11.95, 99, "Battery Ok")

image

If you try and create an Event, the Event engine will not allow it to save: image

Steps to Reproduce Steps to reproduce the behavior:

  1. Create a feature using the code above
  2. Create an event to fire on the values (see screenshot)

Expected behavior Event engine should allow a save


Screenshots See above

Logs n/a

Additional info n/a

spudwebb commented 2 years ago

With HS 4.2.15.0 I cannot reproduce this exact issue, but I see some other issues with the "less than" trigger and this feature.

That being said it is a bit strange to have the exact same status set to a range of values. If you remove the status and add a prefix/suffix instead, the event works correctly, and the status gives you the exact battery %

image

image