From 1aadda4b0ffa649a9484df10f7d810765dee9590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Kiss?= <70820303+g-kiss@users.noreply.github.com> Date: Sun, 28 Nov 2021 11:07:18 +0100 Subject: [PATCH] Fix Shelly dual mode bulb mode switch (#60471) * fix_shelly_dual_mode_bulb_mode_switch * Update __init__.py * Update light.py --- homeassistant/components/shelly/light.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/shelly/light.py b/homeassistant/components/shelly/light.py index 60810c9df4e..3b96cd61f32 100644 --- a/homeassistant/components/shelly/light.py +++ b/homeassistant/components/shelly/light.py @@ -366,7 +366,11 @@ class BlockShellyLight(ShellyBlockEntity, LightEntity): self.wrapper.model, ) - if set_mode and self.wrapper.model in DUAL_MODE_LIGHT_MODELS: + if ( + set_mode + and set_mode != self.mode + and self.wrapper.model in DUAL_MODE_LIGHT_MODELS + ): params["mode"] = set_mode self.control_result = await self.set_state(**params)