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
13 changes: 4 additions & 9 deletions homeassistant/components/yeelightsunflower/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
ATTR_BRIGHTNESS,
ATTR_HS_COLOR,
PLATFORM_SCHEMA,
SUPPORT_BRIGHTNESS,
SUPPORT_COLOR,
ColorMode,
LightEntity,
)
from homeassistant.const import CONF_HOST
Expand All @@ -23,8 +22,6 @@

_LOGGER = logging.getLogger(__name__)

SUPPORT_YEELIGHT_SUNFLOWER = SUPPORT_BRIGHTNESS | SUPPORT_COLOR

PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({vol.Required(CONF_HOST): cv.string})


Expand All @@ -48,6 +45,9 @@ def setup_platform(
class SunflowerBulb(LightEntity):
"""Representation of a Yeelight Sunflower Light."""

_attr_color_mode = ColorMode.HS
_attr_supported_color_modes = {ColorMode.HS}

def __init__(self, light):
"""Initialize a Yeelight Sunflower bulb."""
self._light = light
Expand Down Expand Up @@ -87,11 +87,6 @@ def hs_color(self):
"""Return the color property."""
return color_util.color_RGB_to_hs(*self._rgb_color)

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

def turn_on(self, **kwargs):
"""Instruct the light to turn on, optionally set colour/brightness."""
# when no arguments, just turn light on (full brightness)
Expand Down