From c6d8fffeb40b9987901d84624f2e9f6f0cafc982 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Wed, 27 Apr 2022 17:27:51 +0200 Subject: [PATCH] Migrate netatmo light to color_mode (#70912) --- homeassistant/components/netatmo/light.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/netatmo/light.py b/homeassistant/components/netatmo/light.py index 58b1a0d4f43..7e078153a8a 100644 --- a/homeassistant/components/netatmo/light.py +++ b/homeassistant/components/netatmo/light.py @@ -6,7 +6,7 @@ from typing import Any, cast import pyatmo -from homeassistant.components.light import LightEntity +from homeassistant.components.light import ColorMode, LightEntity from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant, callback from homeassistant.exceptions import PlatformNotReady @@ -62,6 +62,9 @@ async def async_setup_entry( class NetatmoLight(NetatmoBase, LightEntity): """Representation of a Netatmo Presence camera light.""" + _attr_color_mode = ColorMode.ONOFF + _attr_supported_color_modes = {ColorMode.ONOFF} + def __init__( self, data_handler: NetatmoDataHandler,