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

Fix fix isy994 fan detection #12595

Merged
merged 5 commits into from
Feb 22, 2018

Conversation

OverloadUT
Copy link
Contributor

Description:

My #12421 PR failed to fix the first cited issue, which is that FanLincs were not getting properly detected as one light and one fan. Turns out, we really do need to special-case FanLincs because their Insteon type is in the light family, even though they are a combo device. How annoying!

This PR adds a small special case for the FanLinc so that its light subnode gets added as a Hass light. This time, the change has actually been tested by someone with a FanLinc and is confirmed working!

Related issue (if applicable): fixes #12030

Pull request in home-assistant.github.io with documentation (if applicable): None

Checklist:

  • The code change is tested and works locally.

If the code does not interact with devices:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass

1. FanLincs have two nodes: one light and one fan motor. In order for each node to get detected as different Hass entity types, I removed the device-type check for FanLinc. The logic will now fall back on the uom checks which should work just fine. (An alternative approach here would be to special case FanLincs and handle them directly - but seeing as the newer 5.x ISY firmware already handles this much better using NodeDefs, I think this quick and dirty approach is fine for the older firmware.) Fixes home-assistant#12030
2. Some non-dimming switches were appearing as `light`s in Hass due to an duplicate NodeDef being in the light domain filter. Removed! Fixes home-assistant#12340
3. The `unqiue_id` property was throwing an error for certain entity types that don't have an `_id` property from the ISY. This issue has always been present, but was exposed by the entity registry which seems to be the first thing to actually try reading the `unique_id` property from the isy994 component.
ISY reports "med" in the uom, not "medium"
@balloob balloob merged commit 184a54c into home-assistant:dev Feb 22, 2018
@OverloadUT OverloadUT deleted the fix-fix-isy994-fan-detection branch February 22, 2018 07:24
@balloob balloob mentioned this pull request Feb 22, 2018
@home-assistant home-assistant locked and limited conversation to collaborators May 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ISY Component incorrectly detects light as fan
3 participants