Hi there,
I’m developing a MQTT adapter for my heatpump. I can already send data from various sensors as one JSON message. I manually added a MQTT binding thing to my OH 5.0.1 instance and linked the channels to various items. So far so good…
Now I’d like to send out auto discovery message(s). According to MQTT - Home Assistant it should be possible to “send a discovery payload to expose all components for a device“ in just one config message. In this case the config message should be send to a topic, where “the part in the discovery topic must be set to device”.
In my case the topic would be: homeassistant/device/OVUM-AC312P/config
The config message itself looks as follows:
{
"dev": {
"ids": "OVUM-AC312P",
"name": "Ovum AC312P",
"mf": "Ovum",
"mdl": "AC312P"
},
"o": {
"name": "mira2mqtt",
"sw": "0.1"
},
"cmps": {
"Cmp-OutdoorTemp": {
"uniq_id": "OutdoorTemp",
"p": "climate",
"dev_cla": "temperature",
"state_class": "measurement",
"unit_of_meas": "°C",
"val_tpl": "{{ value_json.OutdoorTemp }}"
},
"Cmp-OutdoorTempCurrent": {
"uniq_id": "OutdoorTempCurrent",
"p": "climate",
"dev_cla": "temperature",
"state_class": "measurement",
"unit_of_meas": "°C",
"val_tpl": "{{ value_json.OutdoorTempCurrent }}"
},
},
"stat_t": "OVUM-AC312P/state"
}
But messages to this topics get logged as error by OH:
[WARN ] [nal.discovery.HomeAssistantDiscovery] - HomeAssistant discover error: invalid configuration of thing OVUM-AC312P component device: Failed to process discovery config for device: ValueError: ('Unknown component type %s’, ‘device’)
Is such a device discovery just not possible in OH 5.0.1 and I need to send out individual config messages for the various components i.e. channels?
Benjamin