Closed
Description
Hello again! Just updated to the last version.
Select Add-On (place a lowercase x
for the relevant add-on)
- Xiaomi Mi Scale
Describe the bug
Xiaomi Mi Scale crashes while reading the config file with this error:
-------------------------------------
2020-09-09 09:42:40 - Starting Xiaomi mi Scale...
2020-09-09 09:42:40 - Loading Config From Add-On Options...
2020-09-09 09:42:40 - Config Loaded...
Traceback (most recent call last):
File "/opt/miscale/Xiaomi_Scale.py", line 344, in <module>
main()
File "/opt/miscale/Xiaomi_Scale.py", line 312, in main
if MQTT_DISCOVERY.lower() in ['true', '1', 'y', 'yes']:
AttributeError: 'bool' object has no attribute 'lower'
To Reproduce
Update to the last version and try to start the add-on.
Expected behaviour
I would expect it to load the configuration file without crashing. Also, seeing that you are treating the MQTT_DISCOVERY paramater as string I tried to put that parameter in the config file between quotation marks, but didn't help. It was like this:
MQTT_DISCOVERY: true
And tried like this:
MQTT_DISCOVERY: 'true'
None of them worked
Scale (please complete the following information):
- Name Mi Body Composition Scale
- Model XMTZC02HM
Device running Home Assistant (please complete the following information):
- Raspberry pi 4 B 4GB
- Built-in