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/homeworks/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from homeassistant.components.light import (
ATTR_BRIGHTNESS,
SUPPORT_BRIGHTNESS,
COLOR_MODE_BRIGHTNESS,
LightEntity,
)
from homeassistant.const import CONF_NAME
Expand Down Expand Up @@ -44,6 +44,9 @@ def setup_platform(
class HomeworksLight(HomeworksDevice, LightEntity):
"""Homeworks Light."""

_attr_color_mode = COLOR_MODE_BRIGHTNESS
_attr_supported_color_modes = {COLOR_MODE_BRIGHTNESS}

def __init__(self, controller, addr, name, rate):
"""Create device with Addr, name, and rate."""
super().__init__(controller, addr, name)
Expand All @@ -60,11 +63,6 @@ async def async_added_to_hass(self):
)
self._controller.request_dimmer_level(self._addr)

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

def turn_on(self, **kwargs):
"""Turn on the light."""
if ATTR_BRIGHTNESS in kwargs:
Expand Down