Add support for opening and closing states to Homekit GarageDoor#31290
Add support for opening and closing states to Homekit GarageDoor#31290rickvdl wants to merge 2 commits into
Conversation
…ekit garagedoor device
550bdcc to
3fd2a15
Compare
|
@springstan Processed the requested changes, thanks! |
| STATE_CLOSED: 1, | ||
| STATE_OPENING: 2, | ||
| STATE_CLOSING: 3, | ||
| } |
There was a problem hiding this comment.
Just compared this to other files of homekit/type_xxx.py and now I would recommend to move this dict outside of the class GarageDoorOpener. See the next example for reference:
https://github.com/home-assistant/home-assistant/blob/48402d49dcc54cdba26e44cdfb45e95e6e3edd15/homeassistant/components/homekit/type_locks.py#L15-L20
|
Furthermore, you will need to add more tests to pass the codecoverage for this patch :) |
|
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
Proposed change
Home assistant has support for the
openingandclosingstates for cover's with thegaragedevice class. Currently theopeningandclosingstates are implicitly handled by Homekit, if the cover is open and you press close, it is considered that the cover is closing. However currently it's not possible to set theopeningorclosingstate manually, for situations where the operation was not triggered by Homekit (e.g. a Home assistant automation or perhaps an analog input using a physical button on the garage door).I've also added these states to the MQTT component in #31259. Together this will allow you to proactively report whether a
GarageDooris moving without having triggered the action from Homekit itself. However I think both PR's also make sense apart from each other.Type of change
Additional information
Checklist
black --fast homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all..coveragerc.The integration reached or maintains the following Integration Quality Scale: