-
Notifications
You must be signed in to change notification settings - Fork 66
Description
Hello,
I cant get the auto discovery working correctly for BLE sensors.
When i use this command:
python -m TheengsGateway -H IP -u Name-p Password -D 1
The sensors create a config file correctly in homeassistant/sensor:
Config example:
{"name": "BLE 1A:E9:D9:E8:6B:FC", "state_topic": "homeassistant/sensor/1A:E9:D9:E8:6B:FC", "unique_id": "1A:E9:D9:E8:6B:FC_rssi", "device_class": "signal_strength", "unit_of_measurement": "dBm", "value_template": "{{ value_json.rssi }}", "device": {"identifiers": ["1A:E9:D9:E8:6B:FC"], "name": "BLE Device 1A:E9:D9:E8:6B:FC", "manufacturer": "Unknown"}}
But HA is not regognizing this as a entity.
But BLE also found a electric toothbrush:
{"stat_t": "+/+/BTtoMQTT/7C010A590A99", "name": "ORALB_BT-state", "uniq_id": "7C010A590A99-state", "val_tpl": "{{ value_json.state | is_defined }}", "device": {"ids": ["7C010A590A99"], "cns": [["mac", "7C010A590A99"]], "mf": "Oral-B", "mdl": "ORALB_BT", "name": "BT Toothbrush-590A99", "via_device": "TheengsGateway"}}
Wich got added in HA the right way:
The config file looks completely different, the state topic isnt homeassistant/sensor/1A:E9:D9:E8:6B:FC like the other sensors, but is: "stat_t": "+/+/BTtoMQTT/7C010A590A99". Wich makes more sense because the actual data get published in home/theengsGateway/BTtoMQTT, and not in Homeassisant/sensor.
But when i change the topic to pt homeassistant/sensor it does publish in homeassistant/sensor. But still doesnt get regognized in HA.
Anyone can explain what im doing wrong, or is this by design? Thank you.