New template / mqtt sensor formats

So in the old world you used to be able to group things together into what a device does in the config.yaml

e.g.

sensor DeviceGroup:
  - platform: command_line
  - platform: mqtt

sensor DeviceGroup2:
  - platform: command_line
  - platform: mqtt

etc.

but with the new format it does not appear to allow you to name the group hence you can only have one mqtt: template: tag in the yaml?
i.e. you can’t do

mqtt DeviceGroup:
 sensor:
    - name: 

mqtt DeviceGroup2: 
 sensor:
    - name:

Is this intentional or just something I’ve missed?

Hi @mark.carter ,
I think what you are looking for now is the unique_id. Something like the config below should just work :slight_smile: :

mqtt:
 sensor:
    - name: 
      unique_id: DeviceGroup
    - name:
      unique_id: DeviceGroup2

Yes. You can’t do that anymore (using mqtt, template, rest integrations).

If you wish, you can use packages to allow defining separate collections of MQTT entities (but it’s not exactly the same as the old practice you described).

I don’t believe this will do what OP is intending. This creates two separtate entities… Not one entity with 2 platforms.

Thanks all raised it on github same answers gone with platforms but annoying that it has to be indented from the homeassistant: tag but apart from that works well