-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
Update Sesame component to use Candy House's library using the V3 API #23621
Conversation
if self._is_unlocked: | ||
return STATE_UNLOCKED | ||
return STATE_LOCKED | ||
return STATE_LOCKED if self._is_locked else STATE_UNLOCKED |
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.
We shouldn't overwrite the state
property. It's the responsibility of the base lock entity class.
|
||
@property | ||
def device_state_attributes(self) -> dict: | ||
"""Return the state attributes.""" | ||
attributes = {} | ||
attributes[ATTR_DEVICE_ID] = self._device_id | ||
attributes[ATTR_SERIAL_NO] = self._serial |
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.
We don't allow serial numbers and similar static info in state attributes. The state attributes should hold info that is mostly dynamic and related to the state of the entity.
…home-assistant#23621) * Update Sesame component to use Candy House's library using the V3 API * Updated requirements_all.txt * Fix pylint warning * Revert back to ATTR_DEVICE_ID
Breaking Change:
The Sesame smart lock's 1.0 API uses a username/password pair to authenticate, and may be deprecated in the future. The V3 API uses an API key, so it will require users to update their HA config.
Description:
Related issue (if applicable): fixes #19003
Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#9355
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:
requirements
in the manifest (example).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.If the code does not interact with devices: