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?
-
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
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login