We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d460266 commit aecd359Copy full SHA for aecd359
1 file changed
pyhilo/event.py
@@ -35,7 +35,7 @@ def __init__(self, **event: dict[str, Any]):
35
used_wH: int = consumption.get("currentWh", 0) or 0
36
self.participating: bool = cast(bool, event.get("isParticipating", False))
37
self.configurable: bool = cast(bool, event.get("isConfigurable", False))
38
- self.period: str = cast(str, event.get("period", ""))
+ self.period: str = (cast(str, event.get("period", "")) or "").lower()
39
self.event_id: int = cast(int, event["id"])
40
self.total_devices: int = len(devices)
41
self.opt_out_devices: int = len([x for x in devices if x["optOut"]])
0 commit comments