mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-06 10:44:04 +00:00
Do not send light_on value to iot bulb set_state (#1090)
Passing this extra value caused the `ignore_default` check in the `IotBulb._set_light_state` method to fail which causes the device to come back on to the default state.
This commit is contained in:
@@ -230,6 +230,8 @@ class Light(IotModule, LightInterface):
|
||||
state_dict["on_off"] = 1
|
||||
else:
|
||||
state_dict["on_off"] = int(state.light_on)
|
||||
# Remove the light_on from the dict
|
||||
state_dict.pop("light_on", None)
|
||||
return await bulb._set_light_state(state_dict, transition=transition)
|
||||
|
||||
@property
|
||||
|
Reference in New Issue
Block a user