From 7423debc4b89f2ef905d9958e1451039063d6542 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Thu, 15 Jun 2017 01:01:50 +0200 Subject: [PATCH] fix bug --- .../components/device_tracker/__init__.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/homeassistant/components/device_tracker/__init__.py b/homeassistant/components/device_tracker/__init__.py index c753321790f..c425d6bea5c 100644 --- a/homeassistant/components/device_tracker/__init__.py +++ b/homeassistant/components/device_tracker/__init__.py @@ -299,8 +299,8 @@ class DeviceTracker(object): ATTR_HOST_NAME: device.host_name, }) - # During init, we ignore the group - self.group.async_set_group( + # update group + group.async_set_group( self.hass, util.slugify(GROUP_NAME_ALL_DEVICES), visible=False, name=GROUP_NAME_ALL_DEVICES, delta=[device.entity_id]) @@ -324,17 +324,6 @@ class DeviceTracker(object): update_config, self.hass.config.path(YAML_DEVICES), dev_id, device) - @asyncio.coroutine - def async_setup_group(self): - """Initialize group for all tracked devices. - - This method is a coroutine. - """ - entity_ids = (dev.entity_id for dev in self.devices.values() - if dev.track) - self.group = yield from group.Group.async_create_group( - self.hass, GROUP_NAME_ALL_DEVICES, entity_ids, False) - @callback def async_update_stale(self, now: dt_util.dt.datetime): """Update stale devices.