From f49ded05862ab5255c2d0dd7991a096829394a46 Mon Sep 17 00:00:00 2001 From: pvizeli Date: Thu, 15 Jun 2017 10:35:11 +0200 Subject: [PATCH] add more group depency --- homeassistant/components/cover/__init__.py | 1 + homeassistant/components/fan/__init__.py | 2 +- homeassistant/components/light/__init__.py | 1 + homeassistant/components/lock/__init__.py | 4 ++-- homeassistant/components/remote/__init__.py | 3 ++- homeassistant/components/switch/__init__.py | 1 + 6 files changed, 8 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/cover/__init__.py b/homeassistant/components/cover/__init__.py index f913d126c4a..d4e7d4b0db6 100644 --- a/homeassistant/components/cover/__init__.py +++ b/homeassistant/components/cover/__init__.py @@ -27,6 +27,7 @@ from homeassistant.const import ( _LOGGER = logging.getLogger(__name__) DOMAIN = 'cover' +DEPENDENCIES = ['group'] SCAN_INTERVAL = timedelta(seconds=15) GROUP_NAME_ALL_COVERS = 'all covers' diff --git a/homeassistant/components/fan/__init__.py b/homeassistant/components/fan/__init__.py index 2a96a16bf55..7c408b44327 100644 --- a/homeassistant/components/fan/__init__.py +++ b/homeassistant/components/fan/__init__.py @@ -25,7 +25,7 @@ import homeassistant.helpers.config_validation as cv _LOGGER = logging.getLogger(__name__) DOMAIN = 'fan' - +DEPENDENCIES = ['group'] SCAN_INTERVAL = timedelta(seconds=30) GROUP_NAME_ALL_FANS = 'all fans' diff --git a/homeassistant/components/light/__init__.py b/homeassistant/components/light/__init__.py index 30a05215698..1dbd07f9439 100644 --- a/homeassistant/components/light/__init__.py +++ b/homeassistant/components/light/__init__.py @@ -26,6 +26,7 @@ from homeassistant.helpers.restore_state import async_restore_state import homeassistant.util.color as color_util DOMAIN = "light" +DEPENDENCIES = ['group'] SCAN_INTERVAL = timedelta(seconds=30) GROUP_NAME_ALL_LIGHTS = 'all lights' diff --git a/homeassistant/components/lock/__init__.py b/homeassistant/components/lock/__init__.py index 27af8d28764..369f0c93b85 100644 --- a/homeassistant/components/lock/__init__.py +++ b/homeassistant/components/lock/__init__.py @@ -25,6 +25,8 @@ from homeassistant.components import group ATTR_CHANGED_BY = 'changed_by' DOMAIN = 'lock' +DEPENDENCIES = ['group'] +SCAN_INTERVAL = timedelta(seconds=30) ENTITY_ID_ALL_LOCKS = group.ENTITY_ID_FORMAT.format('all_locks') ENTITY_ID_FORMAT = DOMAIN + '.{}' @@ -33,8 +35,6 @@ GROUP_NAME_ALL_LOCKS = 'all locks' MIN_TIME_BETWEEN_SCANS = timedelta(seconds=10) -SCAN_INTERVAL = timedelta(seconds=30) - LOCK_SERVICE_SCHEMA = vol.Schema({ vol.Optional(ATTR_ENTITY_ID): cv.entity_ids, vol.Optional(ATTR_CODE): cv.string, diff --git a/homeassistant/components/remote/__init__.py b/homeassistant/components/remote/__init__.py index 40a419eaa58..4e00a053cf9 100755 --- a/homeassistant/components/remote/__init__.py +++ b/homeassistant/components/remote/__init__.py @@ -30,6 +30,8 @@ ATTR_NUM_REPEATS = 'num_repeats' ATTR_DELAY_SECS = 'delay_secs' DOMAIN = 'remote' +DEPENDENCIES = ['group'] +SCAN_INTERVAL = timedelta(seconds=30) ENTITY_ID_ALL_REMOTES = group.ENTITY_ID_FORMAT.format('all_remotes') ENTITY_ID_FORMAT = DOMAIN + '.{}' @@ -38,7 +40,6 @@ GROUP_NAME_ALL_REMOTES = 'all remotes' MIN_TIME_BETWEEN_SCANS = timedelta(seconds=10) -SCAN_INTERVAL = timedelta(seconds=30) SERVICE_SEND_COMMAND = 'send_command' SERVICE_SYNC = 'sync' diff --git a/homeassistant/components/switch/__init__.py b/homeassistant/components/switch/__init__.py index 0af5dcf4a5c..2af79a54313 100644 --- a/homeassistant/components/switch/__init__.py +++ b/homeassistant/components/switch/__init__.py @@ -23,6 +23,7 @@ from homeassistant.const import ( from homeassistant.components import group DOMAIN = 'switch' +DEPENDENCIES = ['group'] SCAN_INTERVAL = timedelta(seconds=30) GROUP_NAME_ALL_SWITCHES = 'all switches'