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] Disconnected dimmers not removed from HomeKit #118

Closed
johannrichard opened this issue Nov 18, 2020 · 0 comments · Fixed by #167
Closed

[BUG] Disconnected dimmers not removed from HomeKit #118

johannrichard opened this issue Nov 18, 2020 · 0 comments · Fixed by #167
Assignees
Labels
bug Something isn't working

Comments

@johannrichard
Copy link
Owner

johannrichard commented Nov 18, 2020

Describe the bug
If an output/dimmer of a dingz has been visible in HomeKit and is subsequently set to not_connected(implemented via #114), it will not disappear from HomeKit.

To Reproduce

  1. Addd dingz to HomeKit with at least one Dimmer enabled
  2. Once it is running, remove the Dimmer in dingz by setting it to not_connected in the UI
  3. The Dimmer will remain in HomeKit and even survive the restart of HomeBridge

Expected behavior
A Dimmer that is set to not_connected shall be removed from HomeKit (similar to the input / output switch handling)

Plugin environment (please complete the following information):

  • dingz/myStrom Device Firmware Version 1.2.x
  • Plugin Version: 1.8.0
  • Node.js Version 14.14.0
  • Homebridge Version 1.1.6

For inspiration, this is what needs to be done if an output is set to not_connected:

if (
this.accessory.getServiceById(this.platform.Service.Lightbulb, 'D1')
) {
this.platform.log.warn(
'Input active. Dimmer Service 0 can not exist -> remove',
);
this.removeDimmerService('D1');
}

@johannrichard johannrichard added the bug Something isn't working label Nov 18, 2020
@johannrichard johannrichard self-assigned this Nov 18, 2020
@johannrichard johannrichard added this to To do in Homebridge Plugin via automation Nov 18, 2020
@johannrichard johannrichard moved this from To do to In progress in Homebridge Plugin Nov 29, 2020
johannrichard added a commit that referenced this issue Nov 29, 2020
- The dingz FW/API `1.2.x` allows users to hide dimmers from the UI
- At the same time, output/input 1 can be configured as well
when the input is disabled and the dimmer doesn't exist
- check whether `output` of the dimmer is enabled
- in that case, `D1` shouldn't be added at all
- fixes #143
- implements part of  #118

Thanks @granturismo0 for reporting
@johannrichard johannrichard linked a pull request Dec 7, 2020 that will close this issue
Homebridge Plugin automation moved this from In progress to Done Dec 7, 2020
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
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant