Fire events for ISY994 control events#10664
Closed
OverloadUT wants to merge 5 commits intohome-assistant:devfrom
Closed
Fire events for ISY994 control events#10664OverloadUT wants to merge 5 commits intohome-assistant:devfrom
OverloadUT wants to merge 5 commits intohome-assistant:devfrom
Conversation
This allows hass to react directly to Insteon button presses (on switches and remotes), including presses, double-presses, and long holds
5 tasks
The event handler method requires `self.hass` to exist, which doesn't have a value until the async_added_to_hass method is called. Should eliminate a race condition.
PyISY will report unknown states as the number "-inf". This is implemented in the base ISY994 component, but subcomponents that override the `state` method needed some extra logic to handle it as well.
Contributor
Author
|
Removed the WIP tag. This PR is now ready for full review now that the PyISY library published version 1.1.0 |
Contributor
Author
|
Closing, as everything here will be part of #10805 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
A very small code change that massively increases the capability of Hass in an ISY994 household.
Before, Hass was only aware of the state change on all Insteon devices. With this change, Hass emits events every time a "Control" event happens in the Insteon network regardless of what state changes resulted from that Control.
There are also some changes here to support UNKNOWN states from ISY, which is a PyISY breaking change in the new version that this PR utilizes.
Pull request in home-assistant.github.io with documentation (if applicable): Documentation update will be needed, pending approval of the event-based approach here.
Example entry for
configuration.yaml(if applicable):Checklist:
If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
toxrun successfully. Your PR cannot be merged unless tests pass (NO ISY994 TESTS EXIST)REQUIREMENTSvariable ([example][ex-requir]). (pending PyISY version update)requirements_all.txtby runningscript/gen_requirements_all.py. (pending PyISY version update)