diff --git a/homeassistant/components/baf/light.py b/homeassistant/components/baf/light.py index 9557005e5eb..ed5eea8796f 100644 --- a/homeassistant/components/baf/light.py +++ b/homeassistant/components/baf/light.py @@ -39,6 +39,8 @@ async def async_setup_entry( class BAFLight(BAFEntity, LightEntity): """Representation of a Big Ass Fans light.""" + _attr_name = None + @callback def _async_update_attrs(self) -> None: """Update attrs from device.""" @@ -63,23 +65,19 @@ class BAFLight(BAFEntity, LightEntity): class BAFFanLight(BAFLight): """Representation of a Big Ass Fans light on a fan.""" - _attr_name = None - - def __init__(self, device: Device) -> None: - """Init a fan light.""" - super().__init__(device) - self._attr_supported_color_modes = {ColorMode.BRIGHTNESS} - self._attr_color_mode = ColorMode.BRIGHTNESS + _attr_supported_color_modes = {ColorMode.BRIGHTNESS} + _attr_color_mode = ColorMode.BRIGHTNESS class BAFStandaloneLight(BAFLight): """Representation of a Big Ass Fans light.""" + _attr_supported_color_modes = {ColorMode.COLOR_TEMP} + _attr_color_mode = ColorMode.COLOR_TEMP + def __init__(self, device: Device) -> None: """Init a standalone light.""" super().__init__(device) - self._attr_supported_color_modes = {ColorMode.COLOR_TEMP} - self._attr_color_mode = ColorMode.COLOR_TEMP self._attr_min_mireds = color_temperature_kelvin_to_mired( device.light_warmest_color_temperature )