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
11 changes: 5 additions & 6 deletions homeassistant/components/litejet/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_TRANSITION,
SUPPORT_BRIGHTNESS,
COLOR_MODE_BRIGHTNESS,
SUPPORT_TRANSITION,
LightEntity,
)
Expand Down Expand Up @@ -41,6 +41,10 @@ def get_entities(system):
class LiteJetLight(LightEntity):
"""Representation of a single LiteJet light."""

_attr_color_mode = COLOR_MODE_BRIGHTNESS
_attr_supported_color_modes = {COLOR_MODE_BRIGHTNESS}
_attr_supported_features = SUPPORT_TRANSITION

def __init__(self, config_entry, lj, i, name): # pylint: disable=invalid-name
"""Initialize a LiteJet light."""
self._config_entry = config_entry
Expand All @@ -63,11 +67,6 @@ def _on_load_changed(self):
_LOGGER.debug("Updating due to notification for %s", self._name)
self.schedule_update_ha_state(True)

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

@property
def name(self):
"""Return the light's name."""
Expand Down