Restore states through a JSON store instead of recorder (#17270)
* Restore states through a JSON store * Accept entity_id directly in restore state helper * Keep states stored between runs for a limited time * Remove warning
This commit is contained in:
parent
a039c3209b
commit
5c3a4e3d10
46 changed files with 493 additions and 422 deletions
|
@ -346,8 +346,7 @@ class EntityPlatform:
|
|||
self.entities[entity_id] = entity
|
||||
entity.async_on_remove(lambda: self.entities.pop(entity_id))
|
||||
|
||||
if hasattr(entity, 'async_added_to_hass'):
|
||||
await entity.async_added_to_hass()
|
||||
await entity.async_added_to_hass()
|
||||
|
||||
await entity.async_update_ha_state()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue