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

bugs in handling Smart by Bond fan's light #24

Open
bkgray opened this issue Feb 20, 2022 · 0 comments
Open

bugs in handling Smart by Bond fan's light #24

bkgray opened this issue Feb 20, 2022 · 0 comments

Comments

@bkgray
Copy link

bkgray commented Feb 20, 2022

I installed a Minka Aire Concept IV today. The integrated light's status is not updated correctly when the status is modified outside of the HE app (e.g. with the phone app or the remote controller).

I believe that the problem is in the app at line 283. The call to getChileDevice() is made on component. But if we got to line 283, component is known to be null (from the test at 280). That call should be made on dev - not component.

return dev?.getChildDevice(hubId + ":bond:" + deviceId) ?: null

Also, the logic in handling the light's setting update doesn't match what happens with my device. The on/off status is reported in field "light" and is either 0 or 1. When the light is turned off, "light" has a value of 0, and the "brightness" value does not change from what it was just before the light was turned off. At 555, the tests on deviceState.brightness and deviceState.light should both happen on each update - they should not be in an if-else.

The value of deviceState.brightness does not affect deviceState.light. If the level is set to 0 in the device panel, the light remains on and the brightness level on the physical fan light is set to 1. That's not what happens in the code for handling the update.

I modified my code to this:

  • if the reported deviceState.brightness is not null, set the HE value to match
  • if the deviceState.light is > 0 set the switch state to ON, else set the switch state to off

I think that this logic better reflects what's happening on the fan and what it reports back to HE.

I am happy to provide log information and to test changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant