ESPHome fix missing state in certain circumstances (#28729)
* Fix ESPHome having missing state in certain situations Fixes https://github.com/esphome/issues/issues/828 * Update requirements_all * Also fix climate preset mode
This commit is contained in:
parent
fc04b3e31c
commit
a1f2b6d402
6 changed files with 10 additions and 4 deletions
|
@ -44,6 +44,8 @@ class EsphomeBinarySensor(EsphomeEntity, BinarySensorDevice):
|
|||
return self._entry_data.available
|
||||
if self._state is None:
|
||||
return None
|
||||
if self._state.missing_state:
|
||||
return None
|
||||
return self._state.state
|
||||
|
||||
@property
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue