Better detection for brightness support in fibaro light (#71615)

This commit is contained in:
rappenze 2022-05-25 09:07:55 +02:00 committed by GitHub
parent 88c49f034a
commit 1e4690626f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -86,7 +86,10 @@ class FibaroLight(FibaroDevice, LightEntity):
or "RGBW" in fibaro_device.type
or "rgbw" in fibaro_device.type
)
supports_dimming = "levelChange" in fibaro_device.interfaces
supports_dimming = (
"levelChange" in fibaro_device.interfaces
and "setValue" in fibaro_device.actions
)
if supports_color and supports_white_v:
self._attr_supported_color_modes = {ColorMode.RGBW}