diff --git a/custom_components/bhyve/sensor.py b/custom_components/bhyve/sensor.py index f0bb8f0..45f238f 100644 --- a/custom_components/bhyve/sensor.py +++ b/custom_components/bhyve/sensor.py @@ -146,7 +146,7 @@ def _on_ws_data(self, data): # event = data.get("event") if event in (EVENT_BATTERY_STATUS): - battery_level = self.parse_battery_level(event) + battery_level = self.parse_battery_level(data) self._state = battery_level self._attrs[ATTR_BATTERY_LEVEL] = battery_level