-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Entity creation aborted when battery level is 0 #11
Comments
Indeed i suspect the battery level is not available (yet) for my lock which caused the integration to abort the entity/device creation. i replaced "battery_level": data[CONF_BATTERY_LEVEL] by "battery_level": 0 in the lock.py and the lock is added successfully and is controllable bart |
Changed back after calibration and it works indeed :) happy to test or help with new features, added some additional attributes in my own integration. But im not a coder ;) |
Hi;
i see an issue when adding my first bold lock. I suspect due to the fact the battery value is not yet populated. I see in the app its still calibrating the battery value.
refer to this error
Logger: homeassistant
Source: custom_components/bold/lock.py:66
Integration: Bold
First occurred: 17:43:27 (2 occurrences)
Last logged: 17:48:36
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 424, in async_add_entities
tasks = [
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 424, in
tasks = [
File "/config/custom_components/bold/lock.py", line 50, in
BoldLockEntity(coordinator=coordinator, data=lock) for lock in locks
File "/config/custom_components/bold/lock.py", line 66, in init
"battery_level": data[CONF_BATTERY_LEVEL],
KeyError: 'batteryLevel'
The text was updated successfully, but these errors were encountered: