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:
Adam Mills authored and Paulus Schoutsen committed 2018-11-28 13:16:43 +01:00
1 parent a039c3209b
commit 5c3a4e3d10
46 files changed
+493 -422

No files matched your search

@@ -840,6 +840,7 @@ class MqttAvailability(Entity):
This method must be run in the event loop and returns a coroutine.
"""
await super().async_added_to_hass()
await self._availability_subscribe_topics()
async def availability_discovery_update(self, config: dict):
@@ -900,6 +901,8 @@ class MqttDiscoveryUpdate(Entity):
async def async_added_to_hass(self) -> None:
"""Subscribe to discovery updates."""
await super().async_added_to_hass()
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.components.mqtt.discovery import (
ALREADY_DISCOVERED, MQTT_DISCOVERY_UPDATED)