Use ColorMode enum in tolo (#70541)

pull/70908/head
epenet 2022-04-23 21:44:29 +02:00 committed by GitHub
parent 30b76db390
commit 6e14f67860
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -1,10 +1,9 @@
"""TOLO Sauna light controls."""
from __future__ import annotations
from typing import Any
from homeassistant.components.light import COLOR_MODE_ONOFF, 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
@ -26,8 +25,9 @@ async def async_setup_entry(
class ToloLight(ToloSaunaCoordinatorEntity, LightEntity):
"""Sauna light control."""
_attr_color_mode = ColorMode.ONOFF
_attr_name = "Sauna Light"
_attr_supported_color_modes = {COLOR_MODE_ONOFF}
_attr_supported_color_modes = {ColorMode.ONOFF}
def __init__(
self, coordinator: ToloSaunaUpdateCoordinator, entry: ConfigEntry