diff --git a/homeassistant/components/device_tracker/googlehome.py b/homeassistant/components/device_tracker/googlehome.py index b0aa4b3bf98..be6d947a60a 100644 --- a/homeassistant/components/device_tracker/googlehome.py +++ b/homeassistant/components/device_tracker/googlehome.py @@ -8,7 +8,7 @@ import logging from datetime import timedelta from homeassistant.components.device_tracker import DeviceScanner -from homeassistant.components.googlehome import CLIENT, DOMAIN, NAME +from homeassistant.components.googlehome import CLIENT, NAME from homeassistant.helpers.event import async_track_time_interval from homeassistant.util import slugify @@ -41,7 +41,7 @@ class GoogleHomeDeviceScanner(DeviceScanner): async def async_init(self): """Further initialize connection to Google Home.""" await self.client.update_data(self.host) - data = self.hass.data[DOMAIN][self.host] + data = self.hass.data[NAME][self.host] info = data.get('info', {}) connected = bool(info) if connected: @@ -55,7 +55,7 @@ class GoogleHomeDeviceScanner(DeviceScanner): """Ensure the information from Google Home is up to date.""" _LOGGER.debug('Checking Devices on %s', self.host) await self.client.update_data(self.host) - data = self.hass.data[DOMAIN][self.host] + data = self.hass.data[NAME][self.host] info = data.get('info') bluetooth = data.get('bluetooth') if info is None or bluetooth is None: diff --git a/homeassistant/components/googlehome.py b/homeassistant/components/googlehome.py index 066cb006d9b..4ff7de59529 100644 --- a/homeassistant/components/googlehome.py +++ b/homeassistant/components/googlehome.py @@ -20,7 +20,7 @@ REQUIREMENTS = ['googledevices==1.0.2'] DOMAIN = 'googlehome' CLIENT = 'googlehome_client' -NAME = 'GoogleHome' +NAME = DOMAIN CONF_DEVICE_TYPES = 'device_types' CONF_RSSI_THRESHOLD = 'rssi_threshold'