-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
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
Miscellaneous ESPHome cleanups #19425
Conversation
@@ -60,4 +60,4 @@ def available(self): | |||
"""Return True if entity is available.""" | |||
if self._static_info.is_status_binary_sensor: | |||
return True | |||
return super(EsphomeEntity, self).available | |||
return super().available |
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.
'binary_sensor', | ||
'cover', | ||
'fan', | ||
'light', | ||
'sensor', |
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.
@@ -461,6 +461,7 @@ def __init__(self, entry_id: str, component_key: str, key: int): | |||
"""Unregister callbacks.""" | |||
for remove_callback in self._remove_callbacks: | |||
remove_callback() | |||
self._remove_callbacks = [] |
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.
@property | ||
def assumed_state(self) -> bool: | ||
"""Return true if we do optimistic updates.""" | ||
return self._static_info.optimistic |
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.
Switches can also be optimistic in ESPHome (for example template switches without a state lambda). Forgot to include it in the original PR.
Description:
See comments
Checklist:
tox
. Your PR cannot be merged unless tests pass