Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(BUG) Dimming a light under 5% causes setLevel to be called with value 0 and command fails in hubitat #219

Open
b-ill-y opened this issue Apr 30, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@b-ill-y
Copy link

b-ill-y commented Apr 30, 2024

About Your Setup

  • How many devices are detected?:
  • Hubitat App Version: 2.3.8.140
  • Homebridge Plugin Version: 2.9.2
  • Homebridge Version: 2.9.4
  • NodeJS Version: v18.19.0

Expected Behavior

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:
image

Hubitat complains:
image

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:

  1. Start from a level above 10% brightness, and pull the slider down to 1%-4%
  2. 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.

@b-ill-y b-ill-y added the bug Something isn't working label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants