diff --git a/homeassistant/components/lutron_caseta/__init__.py b/homeassistant/components/lutron_caseta/__init__.py index aaac06a6bd5..a3e384fd77b 100644 --- a/homeassistant/components/lutron_caseta/__init__.py +++ b/homeassistant/components/lutron_caseta/__init__.py @@ -81,9 +81,7 @@ class LutronCasetaDevice(Entity): async def async_added_to_hass(self): """Register callbacks.""" - self._smartbridge.add_subscriber( - self.device_id, self.async_schedule_update_ha_state - ) + self._smartbridge.add_subscriber(self.device_id, self.async_write_ha_state) @property def device_id(self): @@ -108,7 +106,7 @@ class LutronCasetaDevice(Entity): @property def device_state_attributes(self): """Return the state attributes.""" - attr = {"Device ID": self.device_id, "Zone ID": self._device["zone"]} + attr = {"device_id": self.device_id, "zone_id": self._device["zone"]} return attr @property diff --git a/homeassistant/components/lutron_caseta/cover.py b/homeassistant/components/lutron_caseta/cover.py index afd669153e0..60c723b7b42 100644 --- a/homeassistant/components/lutron_caseta/cover.py +++ b/homeassistant/components/lutron_caseta/cover.py @@ -17,14 +17,14 @@ _LOGGER = logging.getLogger(__name__) async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): """Set up the Lutron Caseta shades as a cover device.""" - devs = [] + entities = [] bridge = hass.data[LUTRON_CASETA_SMARTBRIDGE] cover_devices = bridge.get_devices_by_domain(DOMAIN) for cover_device in cover_devices: - dev = LutronCasetaCover(cover_device, bridge) - devs.append(dev) + entity = LutronCasetaCover(cover_device, bridge) + entities.append(entity) - async_add_entities(devs, True) + async_add_entities(entities, True) class LutronCasetaCover(LutronCasetaDevice, CoverDevice): diff --git a/homeassistant/components/lutron_caseta/light.py b/homeassistant/components/lutron_caseta/light.py index 53de8b66311..ba4342ecfce 100644 --- a/homeassistant/components/lutron_caseta/light.py +++ b/homeassistant/components/lutron_caseta/light.py @@ -25,14 +25,14 @@ def to_hass_level(level): async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): """Set up the Lutron Caseta lights.""" - devs = [] + entities = [] bridge = hass.data[LUTRON_CASETA_SMARTBRIDGE] light_devices = bridge.get_devices_by_domain(DOMAIN) for light_device in light_devices: - dev = LutronCasetaLight(light_device, bridge) - devs.append(dev) + entity = LutronCasetaLight(light_device, bridge) + entities.append(entity) - async_add_entities(devs, True) + async_add_entities(entities, True) class LutronCasetaLight(LutronCasetaDevice, Light): diff --git a/homeassistant/components/lutron_caseta/scene.py b/homeassistant/components/lutron_caseta/scene.py index abdbcaa03cd..593f58f5274 100644 --- a/homeassistant/components/lutron_caseta/scene.py +++ b/homeassistant/components/lutron_caseta/scene.py @@ -10,14 +10,14 @@ _LOGGER = logging.getLogger(__name__) async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): """Set up the Lutron Caseta lights.""" - devs = [] + entities = [] bridge = hass.data[LUTRON_CASETA_SMARTBRIDGE] scenes = bridge.get_scenes() for scene in scenes: - dev = LutronCasetaScene(scenes[scene], bridge) - devs.append(dev) + entity = LutronCasetaScene(scenes[scene], bridge) + entities.append(entity) - async_add_entities(devs, True) + async_add_entities(entities, True) class LutronCasetaScene(Scene): diff --git a/homeassistant/components/lutron_caseta/switch.py b/homeassistant/components/lutron_caseta/switch.py index f6eb846ecfb..23cd1db8f79 100644 --- a/homeassistant/components/lutron_caseta/switch.py +++ b/homeassistant/components/lutron_caseta/switch.py @@ -10,15 +10,15 @@ _LOGGER = logging.getLogger(__name__) async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): """Set up Lutron switch.""" - devs = [] + entities = [] bridge = hass.data[LUTRON_CASETA_SMARTBRIDGE] switch_devices = bridge.get_devices_by_domain(DOMAIN) for switch_device in switch_devices: - dev = LutronCasetaLight(switch_device, bridge) - devs.append(dev) + entity = LutronCasetaLight(switch_device, bridge) + entities.append(entity) - async_add_entities(devs, True) + async_add_entities(entities, True) return True