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

merged 1 commit into from Dec 18, 2018


Copy link

OttoWinter commented Dec 18, 2018


See comments


  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
@@ -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

This comment has been minimized.


This comment has been minimized.

@@ -461,6 +461,7 @@ def __init__(self, entry_id: str, component_key: str, key: int):
"""Unregister callbacks."""
for remove_callback in self._remove_callbacks:
self._remove_callbacks = []

This comment has been minimized.


OttoWinter Dec 18, 2018


Didn't know that async_will_remove behaves this way (see #19414) - this fixes the same thing as in #19414

def assumed_state(self) -> bool:
"""Return true if we do optimistic updates."""
return self._static_info.optimistic

This comment has been minimized.


OttoWinter Dec 18, 2018


Switches can also be optimistic in ESPHome (for example template switches without a state lambda). Forgot to include it in the original PR.

@MartinHjelmare MartinHjelmare merged commit 7317b1b into home-assistant:dev Dec 18, 2018

5 checks passed

Hound No violations found. Woof!
WIP ready for review
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
coverage/coveralls Coverage remained the same at 93.033%

@wafflebot wafflebot bot removed the in progress label Dec 18, 2018

@OttoWinter OttoWinter deleted the OttoWinter:esphome-cleanup branch Dec 18, 2018

dshokouhi added a commit to dshokouhi/home-assistant that referenced this pull request Dec 25, 2018

@balloob balloob referenced this pull request Jan 10, 2019


0.85.0 #19897

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment