Skip to content

Commit

Permalink
Fix turn_on for TX Ultimate Ambient Light #1369
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Jan 30, 2025
1 parent 23b1d2a commit 79067e4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions custom_components/sonoff/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -1233,14 +1233,11 @@ def set_state(self, params: dict):
async def async_turn_on(
self, brightness: int = None, effect: str = None, **kwargs
) -> None:
params = {}
params = {"lightSwitch": "on"}

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

if not params:
params["lightSwitch"] = "on"

await self.ewelink.send(self.device, params)

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

0 comments on commit 79067e4

Please sign in to comment.