MQTT register device instied of entity

Hi Everyone,

I just moved from OpenHab to HA to see the ‘other world’ too. First of all I’m a newbie hobbyst in home automation. I’m developing my own DIY devices and have tons of questions. I have read the docs but I have something maybe I missed and I would like to ask help.

I read that it is possible to auto discover my MQTT devices by sending specific messages to specific topic. I made some test and what I could achive is to register my DIY sensors as a seperate HA entity.

I’m developing a multisensor which measuser multiple things (temp, humidity, light, motion etc.). I would like to register my multisensor device as a device with seperate entities it measures. Is that possible?
For example my smart phone is recognized under HA devices as a device and its properties are registered as entities connected to that device (battery, wifi name, RSSI…).

I’ve tried to search for register devices and similar keywords but I found only related topics to autodiscover which only registers under entities not under devices. Problably I search for the wrong words or terms. Any help would be really appriciated.

Thanks a lot!

If you want to register multiple entities under the same device, you need multiple discovery messages with the same device id.

E.g. a temperature & humidity sensor

topic : homeassistant/sensor/xiron_4503/temperature/config

'{"unit_of_measurement":"°C","device_class":"temperature","value_template":"{{ value_json.TEMP }}","state_topic":"rflink/Xiron-4503","name":"boven_temperature","unique_id":"Xiron_4503_temp","device":{"identifiers":["xiron_4503"],"name":"xiron_4503","model":"Digoo temp & humidity sensor","manufacturer":"Digoo"}}'

topic : homeassistant/sensor/xiron_4503/humidity/config

'{"unit_of_measurement":"%","device_class":"humidity","value_template":"{{ value_json.HUM }}","state_topic":"rflink/Xiron-4503","name":"boven_humidity","unique_id":"boven_humidity","device":{"identifiers":["xiron_4503"],"name":"xiron_4503","model":"Digoo temp & humidity sensor","manufacturer":"Digoo"}}'

For a device, the important part is after device:

Thank you! I have tried similar but I’m sure I made some syntax error with the ‘device’ tag.
This is exactly I was looking for.

Thank you very much and sorry for the noob question!