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
18 changes: 5 additions & 13 deletions homeassistant/components/skybell/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_HS_COLOR,
SUPPORT_BRIGHTNESS,
SUPPORT_COLOR,
ColorMode,
LightEntity,
)
from homeassistant.core import HomeAssistant
Expand Down Expand Up @@ -45,15 +44,13 @@ def _to_hass_level(level):
class SkybellLight(SkybellDevice, LightEntity):
"""A binary sensor implementation for Skybell devices."""

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

def __init__(self, device):
"""Initialize a light for a Skybell device."""
super().__init__(device)
self._name = self._device.name

@property
def name(self):
"""Return the name of the sensor."""
return self._name
self._attr_name = device.name

def turn_on(self, **kwargs):
"""Turn on the light."""
Expand Down Expand Up @@ -83,8 +80,3 @@ def brightness(self):
def hs_color(self):
"""Return the color of the light."""
return color_util.color_RGB_to_hs(*self._device.led_rgb)

@property
def supported_features(self):
"""Flag supported features."""
return SUPPORT_BRIGHTNESS | SUPPORT_COLOR