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
Add support Slide cover #25913
Add support Slide cover #25913
Conversation
Fixed Removed other pylint warnings
Will anybody from the HA team will look into this PR? |
@MartinHjelmare I am reworking the init.py/cover.py/const.py at this moment and i will test the new code, before committing it again. I have replied to a few code reviews (the exception and login, aiohttp session, retry and timeout configuration items) |
Removed DOMAIN not exist check Changed if to min/max Changed 3rd party import to top of the module Removed timeout/retry parameters Removed unused constants Added check for discovery_info is none Changed pass slide object instead of full hass object Changed pass api object instead of full hass object Added unique_id functionality Removed entity_id/name properties Removed supported_features/state functions
Changed Improved exception handling Changed Updated Slide API to 0.50.0
Changed retry setup into coroutine
@MartinHjelmare I am still new with the process, but it looks like I don't have any open points/changed pending from my side? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not required for this PR, but it would be good to update the library to use aiohttp client session api.
except (goslideapi.ClientConnectionError, goslideapi.ClientTimeoutError) as err: | ||
_LOGGER.error( | ||
"Error connecting to Slide Cloud: %s, going to retry in %s seconds", | ||
str(err), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The exception argument has a __str__
magic method.
str(err), | |
err, |
async_call_later(hass, DEFAULT_RETRY, retry_setup) | ||
return True | ||
|
||
if result: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we invert this check and log error and return False if true, we can outdent the debug log.
if result: | |
if not result: |
Changed invert if result to if not result
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
Can be merged when build passes. |
Breaking Change:
None
Description:
Add support Slide cover integration (Cloud API).
Related issue (if applicable): None
Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#10127
Example entry for
configuration.yaml
(if applicable):Checklist:
tox
. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
python3 -m script.hassfest
.requirements_all.txt
by runningpython3 -m script.gen_requirements_all
..coveragerc
.