Multiple yaml files for mqtt sensors

Hi,

I have multiple devices that communicate easily with iobroker. Now I need to get the information in home assistant :pleading_face::disappointed:

This is proving to be a bit more difficult than it should be. I have managed to get all topics sent via mqtt.

All in all I am looking at about 300 sensors that unless anyone has a better idea need to be manually configured.

To keep things organized, i would like to have a folder for the mqtt sensors. Each file would be a different device with multiple sensors. When attempting to implement this, I get the error that “sensor” is defined multiple times. Which is true due to each file starting with “sensor”. If i take all but one out, then only the sensors in the one file show up. Also makes some sense. Any suggestions how one could organize the mqtt sensors in multiple files?

Thanks!

Did you solve this?

I have a similar question about the best way to add multiple sensors grouped by device.
As of right now I have one working but have dozens more to add. I did get an error when trying to add another under the first instance.

Here is my code for the first one:

# Inverter
mqtt:
    sensor:
        name: "Inverter Fet Temperature"
        state_topic: "RVC/INVERTER_TEMPERATURE_STATUS/1"
        value_template: '{{value_json["fet temperature F"]}}'
        device_class: temperature
        unit_of_measurement: '°F'
        icon: mdi:thermometer

Any comments on a practical way to group and get multiple sensors listed without errors would be appreciated.