From 98f159a039eeb7fc0a3cd9228aede22b8b33062f Mon Sep 17 00:00:00 2001 From: cdheiser <10488026+cdheiser@users.noreply.github.com> Date: Thu, 22 Nov 2018 23:54:28 -0800 Subject: [PATCH] [Breaking Change] Cleanup Lutron light component (#18650) Remove the return value from setup_platform Convert LutronLight.__init__ to use super() when referencing the parent class. Change device_state_attributes() to use lowercase snakecase (Rename 'Lutron Integration ID' to 'lutron_integration_id') --- homeassistant/components/light/lutron.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/light/lutron.py b/homeassistant/components/light/lutron.py index 6c4047e2314..ee08e532ce7 100644 --- a/homeassistant/components/light/lutron.py +++ b/homeassistant/components/light/lutron.py @@ -24,7 +24,6 @@ def setup_platform(hass, config, add_entities, discovery_info=None): devs.append(dev) add_entities(devs, True) - return True def to_lutron_level(level): @@ -43,7 +42,7 @@ class LutronLight(LutronDevice, Light): def __init__(self, area_name, lutron_device, controller): """Initialize the light.""" self._prev_brightness = None - LutronDevice.__init__(self, area_name, lutron_device, controller) + super().__init__(self, area_name, lutron_device, controller) @property def supported_features(self): @@ -77,7 +76,7 @@ class LutronLight(LutronDevice, Light): def device_state_attributes(self): """Return the state attributes.""" attr = {} - attr['Lutron Integration ID'] = self._lutron_device.id + attr['lutron_integration_id'] = self._lutron_device.id return attr @property