mirror of
https://github.com/home-assistant/core.git
synced 2025-11-12 20:40:18 +00:00
Add coverage for binary_sensor platform to esphome (#95067)
This commit is contained in:
@@ -49,10 +49,10 @@ class EsphomeBinarySensor(
|
||||
# Status binary sensors indicated connected state.
|
||||
# So in their case what's usually _availability_ is now state
|
||||
return self._entry_data.available
|
||||
if not self._has_state:
|
||||
return None
|
||||
state = self._state
|
||||
return None if state.missing_state else state.state
|
||||
if not self._has_state or state.missing_state:
|
||||
return None
|
||||
return state.state
|
||||
|
||||
@callback
|
||||
def _on_static_info_update(self, static_info: EntityInfo) -> None:
|
||||
|
||||
Reference in New Issue
Block a user