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
12 changes: 4 additions & 8 deletions homeassistant/components/tellstick/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from homeassistant.components.light import (
ATTR_BRIGHTNESS,
SUPPORT_BRIGHTNESS,
COLOR_MODE_BRIGHTNESS,
LightEntity,
)
from homeassistant.core import HomeAssistant
Expand All @@ -18,8 +18,6 @@
TellstickDevice,
)

SUPPORT_TELLSTICK = SUPPORT_BRIGHTNESS


def setup_platform(
hass: HomeAssistant,
Expand Down Expand Up @@ -47,6 +45,9 @@ def setup_platform(
class TellstickLight(TellstickDevice, LightEntity):
"""Representation of a Tellstick light."""

_attr_color_mode = COLOR_MODE_BRIGHTNESS
_attr_supported_color_modes = {COLOR_MODE_BRIGHTNESS}

def __init__(self, tellcore_device, signal_repetitions):
"""Initialize the Tellstick light."""
super().__init__(tellcore_device, signal_repetitions)
Expand All @@ -58,11 +59,6 @@ def brightness(self):
"""Return the brightness of this light between 0..255."""
return self._brightness

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

def _parse_ha_data(self, kwargs):
"""Turn the value from HA into something useful."""
return kwargs.get(ATTR_BRIGHTNESS)
Expand Down