Restore attributes of template binary sensor (#69350)
This commit is contained in:
parent
79dc551f5a
commit
7b5dd4a623
3 changed files with 70 additions and 12 deletions
|
@ -331,6 +331,7 @@ class TriggerBinarySensorEntity(TriggerEntity, BinarySensorEntity, RestoreEntity
|
|||
and self._state is None
|
||||
):
|
||||
self._state = last_state.state == STATE_ON
|
||||
self.restore_attributes(last_state)
|
||||
|
||||
if CONF_AUTO_OFF not in self._config:
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue