Skip to content

Home Assistant Auto Discovery #685

@brizzik

Description

@brizzik

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:

Image

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:

Image

{"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:

Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions