Yaml definition for a device with multiple entities

Hi All,

I’m trying to create a set of yaml for mqtt data, and would like to create multiple entities which are grouped into a device - i.e. like MQTT discovery does.
However, I can find no reference on how to do this in manual yaml definitions?

Is this possible?

br,

Simon

As far as I know that’s not possible, you can however create your own discovery messages.
See here for more details.

Thanks for the quick response,

yep, I’ve played with MQTT discovery. The device is Tasmota, but I’d like to do more that I can do with discovery; e.g. add a weblink.
One of the issues with discovery is that I have to create a message per variable, and I’ve not found a way yet to represent things like generic text.

I’ll play some more… one option (because I don’t want to add more and more to the TAS source) is to have a kind of MQTT filter which detects TAS, and then sends hass discovery messages - I did this to prototype MQTT discovery for BLE sensors in TAS before adding the implementation in TAS. But now I’d like to do a but more in HA, like have specific light templates which are modified according to the TAS light type; or maybe based on some generic ‘hass template’ name in one of the TAS status messages. In this way, users could define the templates (sets of discovery messages) they want to use for each ‘type’ of device, and the devices would be added to HA automagically, but according to what they want to see rather than what the original dev thought was important.

I wish I was more ‘python’ - the above was in node-red - else I would consider contributing some sort of templating to the MQTT discovery, or augmenting the native TAS module - but the learning curve is too steep for my time available :(.

br,
Simon

Sorry, I have no clue what you are talking about. I don’t know what TAS is or ehy one would need a weblink for a device?

sorry - TAS-> Tasmota. They have their own web interface, so it would be ‘nice’ to be able to link out from HA to the device’s own interface. I know i could produce weblinks via yaml - hence why I was looking to define the devices in yaml (maybe automatically), but if I can’t connect the entities using yaml, it also seems limiting too :(.

Couldn’t you publish a discovery message that creates a sensor attatched to the device, which then contains the weblink for example

hmm… mqtt discovery only supports certain types - weblink is not one of them… and it seems depreciated with little advice on how to achieve the same thing.
I have now got json attributes against an entity… so may be able to now use a combination of MQTT discovery and platform ‘template’ in yaml.