From 380f0c458817ee561ac92837c400865fa98966c2 Mon Sep 17 00:00:00 2001 From: Martin Hjelmare Date: Thu, 30 Jun 2022 15:06:03 +0200 Subject: [PATCH] Use combines commands in tradfri light --- homeassistant/components/tradfri/light.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/tradfri/light.py b/homeassistant/components/tradfri/light.py index c9d47870e45..9d9dc1f6ac4 100644 --- a/homeassistant/components/tradfri/light.py +++ b/homeassistant/components/tradfri/light.py @@ -214,10 +214,14 @@ class TradfriLight(TradfriBaseEntity, LightEntity): # HSB can always be set, but color temp + brightness is bulb dependent command = dimmer_command if color_command is not None: - command += color_command + command = self._device_control.combine_commands( + [dimmer_command, color_command] + ) if self._device_control.can_combine_commands and temp_command is not None: - await self._api(command + temp_command) + await self._api( + self._device_control.combine_commands([command, temp_command]) + ) else: if temp_command is not None: await self._api(temp_command)