From a9cd5bd9c88e3a0387a47c0ed3190c6130fd68db Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Sat, 23 Apr 2022 21:21:18 +0200 Subject: [PATCH] Use ColorMode enum in firmata (#70494) --- homeassistant/components/firmata/light.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/firmata/light.py b/homeassistant/components/firmata/light.py index bec61172486..8f562b12d30 100644 --- a/homeassistant/components/firmata/light.py +++ b/homeassistant/components/firmata/light.py @@ -3,11 +3,7 @@ from __future__ import annotations import logging -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.const import CONF_MAXIMUM, CONF_MINIMUM, CONF_NAME, CONF_PIN from homeassistant.core import HomeAssistant @@ -56,8 +52,8 @@ async def async_setup_entry( class FirmataLight(FirmataPinEntity, LightEntity): """Representation of a light on a Firmata board.""" - _attr_color_mode = COLOR_MODE_BRIGHTNESS - _attr_supported_color_modes = {COLOR_MODE_BRIGHTNESS} + _attr_color_mode = ColorMode.BRIGHTNESS + _attr_supported_color_modes = {ColorMode.BRIGHTNESS} def __init__( self,