Bump cloud to 0.47.1 (#55312)
* Bump cloud to 0.47.0 * Bump reqs * Bump to 0.47.1 * Do not load hass_nabucasa during http startup * fix some tests * Fix test Co-authored-by: Ludeeus <ludeeus@ludeeus.dev>
This commit is contained in:
parent
c68e87c40e
commit
27e29b714c
14 changed files with 66 additions and 31 deletions
|
@ -15,10 +15,10 @@ from homeassistant.const import (
|
|||
ATTR_SUPPORTED_FEATURES,
|
||||
CLOUD_NEVER_EXPOSED_ENTITIES,
|
||||
CONF_NAME,
|
||||
EVENT_HOMEASSISTANT_STARTED,
|
||||
STATE_UNAVAILABLE,
|
||||
)
|
||||
from homeassistant.core import Context, CoreState, HomeAssistant, State, callback
|
||||
from homeassistant.core import Context, HomeAssistant, State, callback
|
||||
from homeassistant.helpers import start
|
||||
from homeassistant.helpers.area_registry import AreaEntry
|
||||
from homeassistant.helpers.device_registry import DeviceEntry
|
||||
from homeassistant.helpers.entity_registry import RegistryEntry
|
||||
|
@ -105,15 +105,14 @@ class AbstractConfig(ABC):
|
|||
self._store = GoogleConfigStore(self.hass)
|
||||
await self._store.async_load()
|
||||
|
||||
if self.hass.state == CoreState.running:
|
||||
await self.async_sync_entities_all()
|
||||
if not self.enabled:
|
||||
return
|
||||
|
||||
async def sync_google(_):
|
||||
"""Sync entities to Google."""
|
||||
await self.async_sync_entities_all()
|
||||
|
||||
self.hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STARTED, sync_google)
|
||||
start.async_at_start(self.hass, sync_google)
|
||||
|
||||
@property
|
||||
def enabled(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue