We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e05b21d commit 1b3412dCopy full SHA for 1b3412d
pyhilo/event.py
@@ -27,7 +27,7 @@ class Event:
27
def __init__(self, **event: dict[str, Any]):
28
"""Initialize."""
29
self._convert_phases(cast(dict[str, Any], event.get("phases")))
30
- params: dict[str, Any] = event.get("parameters", {})
+ params: dict[str, Any] = event.get("parameters") or {}
31
devices: list[dict[str, Any]] = params.get("devices", [])
32
consumption: dict[str, Any] = event.get("consumption", {})
33
allowed_wH: int = consumption.get("baselineWh", 0) or 0
0 commit comments