HA 0.42.2 'Sensor has no attribute _battery_level' error
-
After the upgrade to 0.42.2 all my sensors are being rejected by HA because of the error:
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/mysensors.py", line 391, in device_state_attributes ATTR_BATTERY_LEVEL: node.battery_level, File "/home/homeassistant/.homeassistant/deps/mysensors/__init__.py", line 420, in battery_level return self._battery_level AttributeError: 'Sensor' object has no attribute '_battery_level'`
I haven't tried rolling back to 0.41 or debugging the code yet. Wanted to throw it out there to see if anyone else has experienced similar behaviour?
-
Are you using persistence with a pickle file? I think I've found a bug in that scenario.
PR with fix:
https://github.com/home-assistant/home-assistant/pull/7057
-
Yes, I'm using the persistence & pickle file. The PR fixes the problem. Just tested with latest HA dev branch. Thanks for the quick answer Martin.
3 out of 3
Suggested Topics
-
Forum Theme Problems
Announcements • 8 Apr 2014, 07:05 • hek 8 Apr 2014, 07:05 -
Home Assistant update changed USB port name
Home Assistant • 14 Jan 2024, 17:25 • therik 15 Jan 2024, 10:26 -
2x BME 280 on 2x arduino nano hangs in HomeAssistant
Home Assistant • 27 Jul 2024, 12:25 • HJ_SK 11 Aug 2024, 19:56 -
mysensors regularly disconnect from HA
Home Assistant • 1 Oct 2021, 20:25 • keithellis 29 Aug 2023, 18:09 -
HVAC type sensor in homeassistant
Home Assistant • 17 Aug 2024, 10:50 • tbowmo 17 Aug 2024, 20:51 -
How I delete a node from HA and start over.
Home Assistant • 18 Oct 2024, 02:05 • OldSurferDude 18 Oct 2024, 02:05