Skip to content

Commit

Permalink
It seems to be an issue with the high frequency of querying the devic…
Browse files Browse the repository at this point in the history
…e, reducing it to 0.2Hz seems to be fine.
  • Loading branch information
eolus87 committed Jun 12, 2023
1 parent de7b99a commit e663255
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 72 deletions.
2 changes: 1 addition & 1 deletion config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ energy:
devices:
printer_plug:
address: 192.168.0.49
rate: 1
rate: 0.2

buffer_size: 1000
Empty file removed kasadevices/__init__.py
Empty file.
40 changes: 0 additions & 40 deletions kasadevices/kasaplug.py

This file was deleted.

30 changes: 0 additions & 30 deletions main_test_plug.py

This file was deleted.

2 changes: 1 addition & 1 deletion power/power_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ async def power_request(target: str) -> Tuple[float, str]:
plug = kasa.SmartPlug(target)
try:
await plug.update()
power = await plug.current_consumption()
power = plug.emeter_realtime.power
except Exception as inst:
print(f"Power request function failed with error: {inst}")
power = -1
Expand Down

0 comments on commit e663255

Please sign in to comment.