From ca6c7ef7712a0be321fb8bbdb034ee80dbcd8d85 Mon Sep 17 00:00:00 2001 From: rbflurry Date: Mon, 11 Sep 2017 11:14:44 -0400 Subject: [PATCH 1/3] Update __init__.py --- homeassistant/components/emulated_hue/__init__.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/emulated_hue/__init__.py b/homeassistant/components/emulated_hue/__init__.py index ae0a26aaea4ae9..73b743987833dc 100644 --- a/homeassistant/components/emulated_hue/__init__.py +++ b/homeassistant/components/emulated_hue/__init__.py @@ -66,6 +66,7 @@ }, extra=vol.ALLOW_EXTRA) ATTR_EMULATED_HUE = 'emulated_hue' +ATTR_EMULATED_HUE_HIDDEN = 'emulated_hue_hidden' def setup(hass, yaml_config): @@ -223,7 +224,14 @@ def is_entity_exposed(self, entity): domain = entity.domain.lower() explicit_expose = entity.attributes.get(ATTR_EMULATED_HUE, None) - + explicit_hidden = entity.attributes.get (ATTR_EMULATED_HUE_HIDDEN, None) + if explicit_expose is True or explicit_hidden is False : + expose = True + else: + expose = False + if explicit_expose: + _LOGGER.warning("The attribute 'emulated_hue' is deprecated and will be removed in a" + "future version use 'emulated_hue_hidden' instead") domain_exposed_by_default = \ self.expose_by_default and domain in self.exposed_domains @@ -231,9 +239,9 @@ def is_entity_exposed(self, entity): # the configuration doesn't explicitly exclude it from being # exposed, or if the entity is explicitly exposed is_default_exposed = \ - domain_exposed_by_default and explicit_expose is not False + domain_exposed_by_default and expose is not False - return is_default_exposed or explicit_expose + return is_default_exposed or expose def _load_numbers_json(self): """Set up helper method to load numbers json.""" From 8c40640b61c01dc8f6fbb7f71eac4f613065dc01 Mon Sep 17 00:00:00 2001 From: rbflurry Date: Thu, 14 Sep 2017 08:46:07 -0400 Subject: [PATCH 2/3] Update ios.py --- homeassistant/components/ios.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/ios.py b/homeassistant/components/ios.py index 13ccee9df3e308..e3c58425b27328 100644 --- a/homeassistant/components/ios.py +++ b/homeassistant/components/ios.py @@ -121,7 +121,7 @@ CONF_PUSH: { CONF_PUSH_CATEGORIES: vol.All(cv.ensure_list, [{ vol.Required(CONF_PUSH_CATEGORIES_NAME): cv.string, - vol.Required(CONF_PUSH_CATEGORIES_IDENTIFIER): vol.Upper, + vol.Required(CONF_PUSH_CATEGORIES_IDENTIFIER): vol.Lower, vol.Required(CONF_PUSH_CATEGORIES_ACTIONS): ACTION_SCHEMA_LIST }]) } From a3fef9cb4b5f1048eee1760ca08e1d54a618278e Mon Sep 17 00:00:00 2001 From: rbflurry Date: Thu, 14 Sep 2017 08:58:12 -0400 Subject: [PATCH 3/3] Update __init__.py --- homeassistant/components/emulated_hue/__init__.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/homeassistant/components/emulated_hue/__init__.py b/homeassistant/components/emulated_hue/__init__.py index 73b743987833dc..ae0a26aaea4ae9 100644 --- a/homeassistant/components/emulated_hue/__init__.py +++ b/homeassistant/components/emulated_hue/__init__.py @@ -66,7 +66,6 @@ }, extra=vol.ALLOW_EXTRA) ATTR_EMULATED_HUE = 'emulated_hue' -ATTR_EMULATED_HUE_HIDDEN = 'emulated_hue_hidden' def setup(hass, yaml_config): @@ -224,14 +223,7 @@ def is_entity_exposed(self, entity): domain = entity.domain.lower() explicit_expose = entity.attributes.get(ATTR_EMULATED_HUE, None) - explicit_hidden = entity.attributes.get (ATTR_EMULATED_HUE_HIDDEN, None) - if explicit_expose is True or explicit_hidden is False : - expose = True - else: - expose = False - if explicit_expose: - _LOGGER.warning("The attribute 'emulated_hue' is deprecated and will be removed in a" - "future version use 'emulated_hue_hidden' instead") + domain_exposed_by_default = \ self.expose_by_default and domain in self.exposed_domains @@ -239,9 +231,9 @@ def is_entity_exposed(self, entity): # the configuration doesn't explicitly exclude it from being # exposed, or if the entity is explicitly exposed is_default_exposed = \ - domain_exposed_by_default and expose is not False + domain_exposed_by_default and explicit_expose is not False - return is_default_exposed or expose + return is_default_exposed or explicit_expose def _load_numbers_json(self): """Set up helper method to load numbers json."""