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
14 changes: 5 additions & 9 deletions homeassistant/components/mystrom/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
ATTR_BRIGHTNESS,
ATTR_EFFECT,
ATTR_HS_COLOR,
COLOR_MODE_HS,
PLATFORM_SCHEMA,
SUPPORT_BRIGHTNESS,
SUPPORT_COLOR,
SUPPORT_EFFECT,
SUPPORT_FLASH,
LightEntity,
Expand All @@ -29,8 +28,6 @@

DEFAULT_NAME = "myStrom bulb"

SUPPORT_MYSTROM = SUPPORT_BRIGHTNESS | SUPPORT_EFFECT | SUPPORT_FLASH | SUPPORT_COLOR

EFFECT_RAINBOW = "rainbow"
EFFECT_SUNRISE = "sunrise"

Expand Down Expand Up @@ -74,6 +71,10 @@ async def async_setup_platform(
class MyStromLight(LightEntity):
"""Representation of the myStrom WiFi bulb."""

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

def __init__(self, bulb, name, mac):
"""Initialize the light."""
self._bulb = bulb
Expand All @@ -95,11 +96,6 @@ def unique_id(self):
"""Return a unique ID."""
return self._mac

@property
def supported_features(self):
"""Flag supported features."""
return SUPPORT_MYSTROM

@property
def brightness(self):
"""Return the brightness of the light."""
Expand Down