mirror of
https://github.com/home-assistant/core
synced 2024-07-27 18:58:57 +02:00
Use ColorMode enum in iaqualink (#70510)
This commit is contained in:
parent
346a385f1a
commit
149cc01ed3
@ -4,9 +4,8 @@ from __future__ import annotations
|
||||
from homeassistant.components.light import (
|
||||
ATTR_BRIGHTNESS,
|
||||
ATTR_EFFECT,
|
||||
COLOR_MODE_BRIGHTNESS,
|
||||
COLOR_MODE_ONOFF,
|
||||
DOMAIN,
|
||||
ColorMode,
|
||||
LightEntity,
|
||||
LightEntityFeature,
|
||||
)
|
||||
@ -87,11 +86,11 @@ class HassAqualinkLight(AqualinkEntity, LightEntity):
|
||||
return list(self.dev.supported_light_effects)
|
||||
|
||||
@property
|
||||
def color_mode(self) -> str:
|
||||
def color_mode(self) -> ColorMode:
|
||||
"""Return the color mode of the light."""
|
||||
if self.dev.is_dimmer:
|
||||
return COLOR_MODE_BRIGHTNESS
|
||||
return COLOR_MODE_ONOFF
|
||||
return ColorMode.BRIGHTNESS
|
||||
return ColorMode.ONOFF
|
||||
|
||||
@property
|
||||
def supported_color_modes(self) -> set[str] | None:
|
||||
|
Loading…
Reference in New Issue
Block a user