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:
Paulus Schoutsen 2021-09-01 09:54:54 -07:00 committed by GitHub
parent c68e87c40e
commit 27e29b714c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 66 additions and 31 deletions

View file

@ -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):