FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix smart led status to report rule status by sdb9696 · Pull Request #1002 · python-kasa/python-kasa · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (2) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
2 changes: 1 addition & 1 deletion kasa/smart/modules/led.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def mode(self):
@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.
Expand Down
2 changes: 1 addition & 1 deletion kasa/tests/test_cli.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

Back | FazBrowse Home | New Git URL