Skip to content

Commit aecd359

Browse files
committed
Update event.py
Make sure event stays lowercase
1 parent d460266 commit aecd359

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyhilo/event.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def __init__(self, **event: dict[str, Any]):
3535
used_wH: int = consumption.get("currentWh", 0) or 0
3636
self.participating: bool = cast(bool, event.get("isParticipating", False))
3737
self.configurable: bool = cast(bool, event.get("isConfigurable", False))
38-
self.period: str = cast(str, event.get("period", ""))
38+
self.period: str = (cast(str, event.get("period", "")) or "").lower()
3939
self.event_id: int = cast(int, event["id"])
4040
self.total_devices: int = len(devices)
4141
self.opt_out_devices: int = len([x for x in devices if x["optOut"]])

0 commit comments

Comments
 (0)