From 12a57ad9251b95231b7f6ea6ef433c32328a7944 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Wed, 29 Dec 2021 15:35:41 +0100 Subject: [PATCH] Fix Tuya data type information in lights (#62993) --- homeassistant/components/tuya/light.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/tuya/light.py b/homeassistant/components/tuya/light.py index d73b6d236db..804daa76e50 100644 --- a/homeassistant/components/tuya/light.py +++ b/homeassistant/components/tuya/light.py @@ -405,7 +405,7 @@ class TuyaLightEntity(TuyaEntity, LightEntity): if self._brightness_dpcode: self._attr_supported_color_modes.add(COLOR_MODE_BRIGHTNESS) self._brightness_type = IntegerTypeData.from_json( - device.status_range[self._brightness_dpcode].values + device.function[self._brightness_dpcode].values ) # Check if min/max capable @@ -416,17 +416,17 @@ class TuyaLightEntity(TuyaEntity, LightEntity): and description.brightness_min in device.function ): self._brightness_max_type = IntegerTypeData.from_json( - device.status_range[description.brightness_max].values + device.function[description.brightness_max].values ) self._brightness_min_type = IntegerTypeData.from_json( - device.status_range[description.brightness_min].values + device.function[description.brightness_min].values ) # Update internals based on found color temperature dpcode if self._color_temp_dpcode: self._attr_supported_color_modes.add(COLOR_MODE_COLOR_TEMP) self._color_temp_type = IntegerTypeData.from_json( - device.status_range[self._color_temp_dpcode].values + device.function[self._color_temp_dpcode].values ) # Update internals based on found color data dpcode