ThomDietrich/miflora-mqtt-daemon

Missing devices and homeassistant-mqtt

hdhk opened this issue · 1 comments

hdhk commented

Hi, first of all thanks for that great work !!!

In the case of the following combination configuration,

config.ini:
reporting_method = homeassistant-mqtt

and missing devices :-),
miflora-mqtt-daemon.py crash with:

[2020-05-04 16:38:29] Announcing Mi Flora devices to MQTT broker for auto-discovery ...
Traceback (most recent call last):
  File "miflora-mqtt-daemon.py", line 293, in <module>
    'sw_version': flora['firmware']
KeyError: 'firmware'

Best regards, Holger

long version :

Xiaomi Mi Flora Plant Sensor MQTT Client/Daemon
Source: https://github.com/ThomDietrich/miflora-mqtt-daemon

[2020-05-04 16:33:39] Connecting to MQTT broker ...
[2020-05-04 16:33:39] MQTT connection established

Adding sensor to device list and testing connection ...
Name:          "Dracaena_Oben"
[2020-05-04 16:35:41] Initial connection to Mi Flora sensor "Dracaena_Oben" (80:EA:CA:89:3A:69) failed due to exception:

Adding sensor to device list and testing connection ...
Name:          "Orchide_Unten"
[2020-05-04 16:37:42] Initial connection to Mi Flora sensor "Orchide_Unten" (80:EA:CA:89:2E:E5) failed due to exception:

Adding sensor to device list and testing connection ...
Name:          "Dracaena_Unten"
[2020-05-04 16:38:26] Initial connection to Mi Flora sensor "Dracaena_Unten" (80:EA:CA:89:2D:C8) failed due to exception:

Adding sensor to device list and testing connection ...
Name:          "Hecke_Garten"
Internal name: "Hecke_Garten"
Device name:   "Flower care"
MAC address:   80:EA:CA:89:4B:33
Firmware:      3.2.2
[2020-05-04 16:38:29] Initial connection to Mi Flora sensor "Hecke_Garten" (80:EA:CA:89:4B:33) successful

[2020-05-04 16:38:29] Announcing Mi Flora devices to MQTT broker for auto-discovery ...
Traceback (most recent call last):
  File "miflora-mqtt-daemon.py", line 293, in <module>
    'sw_version': flora['firmware']
KeyError: 'firmware'

Thanks for the report!