8000 Use empty dict instead of none for energy parameters · python-kasa/python-kasa@af8e648 · GitHub
[go: up one dir, main page]

Skip to content

Commit af8e648

Browse files
committed
Use empty dict instead of none for energy parameters
1 parent 7e72bd9 commit af8e648

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

kasa/smart/modules/energy.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import NoReturn
5+
from typing import Any, NoReturn
66

77
from ...emeterstatus import EmeterStatus
88
from ...exceptions import KasaException
@@ -17,11 +17,11 @@ class Energy(SmartModule, EnergyInterface):
1717

1818
def query(self) -> dict:
1919
"""Query to execute during the update cycle."""
20-
req = {
21-
"get_energy_usage": None,
20+
req: dict[str, Any] = {
21+
"get_energy_usage": {},
2222
}
2323
if self.supported_version > 1:
24-
req["get_current_power"] = None
24+
req["get_current_power"] = {}
2525
return req
2626

2727
@property

0 commit comments

Comments
 (0)
0