home-assistant-tapo-p100
home-assistant-tapo-p100 copied to clipboard
L530 v2.0 state doesn't update
Hi!
I recently bought another l530, turns out it's v2.0, it works well with the integration, as well as the other v1 l530, but unlike this the state(mainly color) doesn't update. If i change colors it shows in ui but when I go from rgb color to white light it doesn't
I took a look at the code and made this change, it seems to work
light.py
async def _change_color_temp(self, color_temp):
_LOGGER.info(f"Mapped color temp: {color_temp}")
constraint_color_temp = clamp(color_temp, self._min_merids, self._max_merids)
kelvin_color_temp = clamp(
mired_to_kelvin(constraint_color_temp),
min_value=self._min_kelvin,
max_value=self._max_kelvin,
)
if (await self.is_hardware_v2()) and self.supported_features & SUPPORT_COLOR_TEMP:
await self._execute_with_fallback(
lambda: self._tapo_coordinator.api.set_hue_saturation(0, 0)
)
await self._execute_with_fallback(
lambda: self._tapo_coordinator.api.set_color_temperature(
kelvin_color_temp)
)