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

from homeassistant.components.light import (
ATTR_BRIGHTNESS,
COLOR_MODE_BRIGHTNESS,
PLATFORM_SCHEMA,
SUPPORT_BRIGHTNESS,
LightEntity,
)
from homeassistant.const import CONF_LIGHTS
Expand Down Expand Up @@ -49,6 +49,9 @@ def setup_platform(
class PilightLight(PilightBaseDevice, LightEntity):
"""Representation of a Pilight switch."""

_attr_color_mode = COLOR_MODE_BRIGHTNESS
_attr_supported_color_modes = {COLOR_MODE_BRIGHTNESS}

def __init__(self, hass, name, config):
"""Initialize a switch."""
super().__init__(hass, name, config)
Expand All @@ -60,11 +63,6 @@ def brightness(self):
"""Return the brightness."""
return self._brightness

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

def turn_on(self, **kwargs):
"""Turn the switch on by calling pilight.send service with on code."""
# Update brightness only if provided as an argument.
Expand Down