Tell us what you think should be happening
If value is rounded down to 0 due to transformAttributeState, the off command should be sent. This presents an issue since homekit allows users to use a slider to turn on the light.
Hubitat app should be able to receive commands with a 0 integer.
Current Behavior
What happens instead of the expected behavior?
setLevel is called with 0, but Hubitat doesn't recognize the command since it is interpreting 0 as undefined property and fails to find method to trigger.
Rounding taking place:
Hubitat complains:
Steps to Reproduce (for bugs)
Provide a link to a live example, or an unambiguous set of steps to reproduce this bug. Include code to reproduce, if relevant
Using a dimmable light:
Start from a level above 10% brightness, and pull the slider down to 1%-4%
Start from off position, slide to 4%, only the on command is recognized, setLevel isn't properly triggered, and the level is incorrect.
Context
**How has this issue affected you? What are you trying to accomplish?
Noticed lights brighter than what they were supposed to be when trying to turn on a device via slider (step 2 from above).
Not a huge issue since this is controlled via a config parameter, but the Hubitat app not receiving setLevel(0) correctly might cause other issues, errors being thrown in log history.
About Your Setup
Expected Behavior
Tell us what you think should be happening If value is rounded down to 0 due to
transformAttributeState
, theoff
command should be sent. This presents an issue since homekit allows users to use a slider to turn on the light.Hubitat app should be able to receive commands with a 0 integer.
Current Behavior
What happens instead of the expected behavior? setLevel is called with
0
, but Hubitat doesn't recognize the command since it is interpreting 0 as undefined property and fails to find method to trigger.Rounding taking place:
Hubitat complains:
Steps to Reproduce (for bugs)
Provide a link to a live example, or an unambiguous set of steps to reproduce this bug. Include code to reproduce, if relevant Using a dimmable light:
on
command is recognized, setLevel isn't properly triggered, and the level is incorrect.Context
**How has this issue affected you? What are you trying to accomplish? Noticed lights brighter than what they were supposed to be when trying to turn on a device via slider (step 2 from above). Not a huge issue since this is controlled via a config parameter, but the Hubitat app not receiving setLevel(0) correctly might cause other issues, errors being thrown in log history.