diff --git a/kasa/smart/modules/led.py b/kasa/smart/modules/led.py index 230b83d9..2d0a354c 100644 --- a/kasa/smart/modules/led.py +++ b/kasa/smart/modules/led.py @@ -27,7 +27,7 @@ class Led(SmartModule, LedInterface): @property def led(self): """Return current led status.""" - return self.data["led_status"] + return self.data["led_rule"] != "never" async def set_led(self, enable: bool): """Set led. diff --git a/kasa/tests/test_cli.py b/kasa/tests/test_cli.py index b163b82f..4f815702 100644 --- a/kasa/tests/test_cli.py +++ b/kasa/tests/test_cli.py @@ -893,7 +893,7 @@ async def test_feature_set(mocker, runner): ) 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