Skip to content

Commit

Permalink
Fix #236: Fix warning when updating battery from websocket event (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebr committed Apr 23, 2024
1 parent af01bb7 commit b0b3c04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/bhyve/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b0b3c04

Please sign in to comment.