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:
Steven B 2024-06-23 07:22:29 +01:00 committed by GitHub
parent 9f14854747
commit f041f9d7e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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.

View File

@ -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