mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-01-08 22:07:06 +00:00
Fix smart led status to report rule status (#1002)
Change the reporting of the led state for smart devices to match the setter which sets the rule to always or never.
This commit is contained in:
parent
9f14854747
commit
f041f9d7e9
@ -27,7 +27,7 @@ class Led(SmartModule, LedInterface):
|
|||||||
@property
|
@property
|
||||||
def led(self):
|
def led(self):
|
||||||
"""Return current led status."""
|
"""Return current led status."""
|
||||||
return self.data["led_status"]
|
return self.data["led_rule"] != "never"
|
||||||
|
|
||||||
async def set_led(self, enable: bool):
|
async def set_led(self, enable: bool):
|
||||||
"""Set led.
|
"""Set led.
|
||||||
|
@ -893,7 +893,7 @@ async def test_feature_set(mocker, runner):
|
|||||||
)
|
)
|
||||||
|
|
||||||
led_setter.assert_called_with(True)
|
led_setter.assert_called_with(True)
|
||||||
assert "Changing led from False to True" in res.output
|
assert "Changing led from True to True" in res.output
|
||||||
assert res.exit_code == 0
|
assert res.exit_code == 0
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user