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: 3 additions & 7 deletions homeassistant/components/axis/light.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
"""Support for Axis lights."""
from axis.event_stream import CLASS_LIGHT

from homeassistant.components.light import (
ATTR_BRIGHTNESS,
COLOR_MODE_BRIGHTNESS,
LightEntity,
)
from homeassistant.components.light import ATTR_BRIGHTNESS, ColorMode, LightEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
Expand Down Expand Up @@ -59,8 +55,8 @@ def __init__(self, event, device):
light_type = device.api.vapix.light_control[self.light_id].light_type
self._attr_name = f"{device.name} {light_type} {event.TYPE} {event.id}"

self._attr_supported_color_modes = {COLOR_MODE_BRIGHTNESS}
self._attr_color_mode = COLOR_MODE_BRIGHTNESS
self._attr_supported_color_modes = {ColorMode.BRIGHTNESS}
self._attr_color_mode = ColorMode.BRIGHTNESS

async def async_added_to_hass(self) -> None:
"""Subscribe lights events."""
Expand Down