Skip to content

Commit 79067e4

Browse files
committed
Fix turn_on for TX Ultimate Ambient Light #1369
1 parent 23b1d2a commit 79067e4

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

custom_components/sonoff/light.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,14 +1233,11 @@ def set_state(self, params: dict):
12331233
async def async_turn_on(
12341234
self, brightness: int = None, effect: str = None, **kwargs
12351235
) -> None:
1236-
params = {}
1236+
params = {"lightSwitch": "on"}
12371237

12381238
if effect and effect in T5_EFFECTS:
12391239
params["lightMode"] = T5_EFFECTS[effect]
12401240

1241-
if not params:
1242-
params["lightSwitch"] = "on"
1243-
12441241
await self.ewelink.send(self.device, params)
12451242

12461243
async def async_turn_off(self, **kwargs) -> None:

0 commit comments

Comments
 (0)