Fix color mode in comelit light (#110326)
This commit is contained in:
parent
9c9fa11654
commit
12709050ea
1 changed files with 3 additions and 1 deletions
|
@ -6,7 +6,7 @@ from typing import Any
|
|||
from aiocomelit import ComelitSerialBridgeObject
|
||||
from aiocomelit.const import LIGHT, STATE_OFF, STATE_ON
|
||||
|
||||
from homeassistant.components.light import LightEntity
|
||||
from homeassistant.components.light import ColorMode, LightEntity
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
@ -34,8 +34,10 @@ async def async_setup_entry(
|
|||
class ComelitLightEntity(CoordinatorEntity[ComelitSerialBridge], LightEntity):
|
||||
"""Light device."""
|
||||
|
||||
_attr_color_mode = ColorMode.ONOFF
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
_attr_supported_color_modes = {ColorMode.ONOFF}
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
|
|
Loading…
Add table
Reference in a new issue