Follow-up: Replace emulated_hue: with emulated_hue_hidden (#9894)

When lights in the hue component are used with the emulated hue component ATTR_EMULATED_HUE is still being used, which was deprecated by #9382. This updates ATTR_EMULATED_HUE to ATTR_EMULATED_HUE_HIDDEN to improve consistency and stop the deprecation warnings.
This commit is contained in:
vatir 2017-11-02 06:45:02 -05:00 committed by Fabian Affolter
parent 417240ee3e
commit f9a019ea82

View File

@ -23,7 +23,7 @@ from homeassistant.components.light import (
SUPPORT_XY_COLOR, Light, PLATFORM_SCHEMA)
from homeassistant.config import load_yaml_config_file
from homeassistant.const import (CONF_FILENAME, CONF_HOST, DEVICE_DEFAULT_NAME)
from homeassistant.components.emulated_hue import ATTR_EMULATED_HUE
from homeassistant.components.emulated_hue import ATTR_EMULATED_HUE_HIDDEN
import homeassistant.helpers.config_validation as cv
REQUIREMENTS = ['phue==1.0']
@ -471,7 +471,8 @@ class HueLight(Light):
"""Return the device state attributes."""
attributes = {}
if not self.allow_in_emulated_hue:
attributes[ATTR_EMULATED_HUE] = self.allow_in_emulated_hue
attributes[ATTR_EMULATED_HUE_HIDDEN] = \
not self.allow_in_emulated_hue
if self.is_group:
attributes[ATTR_IS_HUE_GROUP] = self.is_group
return attributes