Closed dinan5 closed 4 months ago
Yeah, I'm seeing the same. Seems to be working OK, but spamming the log file.
2024-01-06 18:03:32.625 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.back_garden_battery_level fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 894, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1212, in async_device_update
await self.async_update()
File "/config/custom_components/bhyve/sensor.py", line 155, in async_update
await super().async_update()
File "/config/custom_components/bhyve/__init__.py", line 247, in async_update
self._on_ws_data(ws_event)
File "/config/custom_components/bhyve/sensor.py", line 148, in _on_ws_data
battery_level = self.parse_battery_level(event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/bhyve/sensor.py", line 175, in parse_battery_level
battery_level = battery_data.get("percent", 0)
^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'get'
I'm running
Same here
Fixed with #236
Describe the bug Multiple times per day I get the following error message
Expected behaviour No error to occur
BHyve devices 2 devices - Smart Hose Tap, Orbit Sprinkler Controller
Device Diagnostics