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

from homeassistant.components.light import (
ATTR_BRIGHTNESS,
COLOR_MODE_BRIGHTNESS,
PLATFORM_SCHEMA,
SUPPORT_BRIGHTNESS,
LightEntity,
)
from homeassistant.const import CONF_DEVICES, CONF_ID, CONF_NAME
Expand All @@ -20,8 +20,6 @@

_LOGGER = logging.getLogger(__name__)

SUPPORT_X10 = SUPPORT_BRIGHTNESS

PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
{
vol.Required(CONF_DEVICES): vol.All(
Expand Down Expand Up @@ -63,6 +61,9 @@ def setup_platform(
class X10Light(LightEntity):
"""Representation of an X10 Light."""

_attr_color_mode = COLOR_MODE_BRIGHTNESS
_attr_supported_color_modes = {COLOR_MODE_BRIGHTNESS}

def __init__(self, light, is_cm11a):
"""Initialize an X10 Light."""
self._name = light["name"]
Expand All @@ -86,11 +87,6 @@ def is_on(self):
"""Return true if light is on."""
return self._state

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

def turn_on(self, **kwargs):
"""Instruct the light to turn on."""
if self._is_cm11a:
Expand Down