Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions homeassistant/components/lw12wifi/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
ATTR_EFFECT,
ATTR_HS_COLOR,
ATTR_TRANSITION,
COLOR_MODE_HS,
PLATFORM_SCHEMA,
SUPPORT_BRIGHTNESS,
SUPPORT_COLOR,
SUPPORT_EFFECT,
SUPPORT_TRANSITION,
LightEntity,
Expand Down Expand Up @@ -59,6 +58,10 @@ def setup_platform(
class LW12WiFi(LightEntity):
"""LW-12 WiFi LED Controller."""

_attr_color_mode = COLOR_MODE_HS
_attr_supported_color_modes = {COLOR_MODE_HS}
_attr_supported_features = SUPPORT_EFFECT | SUPPORT_TRANSITION

def __init__(self, name, lw12_light):
"""Initialise LW-12 WiFi LED Controller.

Expand All @@ -71,10 +74,6 @@ def __init__(self, name, lw12_light):
self._effect = None
self._rgb_color = [255, 255, 255]
self._brightness = 255
# Setup feature list
self._supported_features = (
SUPPORT_BRIGHTNESS | SUPPORT_EFFECT | SUPPORT_COLOR | SUPPORT_TRANSITION
)

@property
def name(self):
Expand Down Expand Up @@ -103,11 +102,6 @@ def is_on(self):
"""Return true if light is on."""
return self._state

@property
def supported_features(self):
"""Return a list of supported features."""
return self._supported_features

@property
def effect_list(self):
"""Return a list of available effects.
Expand Down