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

import aiohttp

from homeassistant.components.light import SUPPORT_BRIGHTNESS, LightEntity
from homeassistant.components.light import COLOR_MODE_BRIGHTNESS, LightEntity
from homeassistant.const import CONF_HOST
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import PlatformNotReady
Expand All @@ -16,8 +16,6 @@

_LOGGER = logging.getLogger(__name__)

SUPPORTED_FEATURES = SUPPORT_BRIGHTNESS


async def async_setup_platform(
hass: HomeAssistant,
Expand All @@ -41,6 +39,9 @@ async def async_setup_platform(
class SisyphusLight(LightEntity):
"""Representation of a Sisyphus table as a light."""

_attr_color_mode = COLOR_MODE_BRIGHTNESS
_attr_supported_color_modes = {COLOR_MODE_BRIGHTNESS}

def __init__(self, name, table):
"""Initialize the Sisyphus table."""
self._name = name
Expand Down Expand Up @@ -79,11 +80,6 @@ def brightness(self):
"""Return the current brightness of the table's ring light."""
return self._table.brightness * 255

@property
def supported_features(self):
"""Return the features supported by the table; i.e. brightness."""
return SUPPORTED_FEATURES

async def async_turn_off(self, **kwargs):
"""Put the table to sleep."""
await self._table.sleep()
Expand Down