How HA came to this device friendly name?

I hate when software is trying to be smarter than a user, or worse, a maintainer.
I’ve created entities with a device. I’ve used object_id to make sure entity names will stay as I wish.

Why (and how) HA managed to create so indistinct friendly names?

Below a fragment of the configuration:

pck_power_metering:
  mqtt:
    sensor:
      - object_id: "Shelly 3EM Phase 1 Power"
        unique_id: shelly_3em_phase_1_power
        state_topic: "shellies/shelly3em/emeter/0/power"
        unit_of_measurement: "W"
        device_class: power
        device:
          connections: [["mac", "xx:xx:xx:xx:xx:xx"]]
          name: "Shelly 3EM MainHouse"
          configuration_url: "http://192.168.107.75"
          manufacturer: "Allterco Robotics Ltd."
          model: Shelly 3EM (SHEM-3)

      - object_id: "Shelly 3EM Phase 1 Voltage"
        unique_id: shelly_3em_phase_1_voltage
        state_topic: "shellies/shelly3em/emeter/0/voltage"
        unit_of_measurement: "V"
        device_class: voltage
        device:
          connections: [["mac", "xx:xx:xx:xx:xx:xx"]]

      - object_id: "Shelly 3EM Phase 2 Power"
        unique_id: shelly_3em_phase_2_power
        state_topic: "shellies/shelly3em/emeter/1/power"
        unit_of_measurement: "W"
        device_class: power
        device:
          connections: [["mac", "xx:xx:xx:xx:xx:xx"]]

      - object_id: "Shelly 3EM Phase 2 Voltage"
        unique_id: shelly_3em_phase_2_voltage
        state_topic: "shellies/shelly3em/emeter/1/voltage"
        unit_of_measurement: "V"
        device_class: voltage
        device:
          connections: [["mac", "xx:xx:xx:xx:xx:xx"]]

Hello maxym,

Based on
MQTT - Home Assistant.
I think the object_id needs to be lower_case_chase.

You have:

Are there errors in the log about this?

Now I’ve never used this, but that’s how I read it.

As far as I understand providing an object id determines entity identifier/name. And it works perfectly in my case. So I assume the format is accepted.

But the friendly name is screwed up. It should take it from the object id, shouldn’t it? But it doesn’t. How did it make up this name? from the device name and the device class?

BTW I cannot find information that object_id must be lower case. There is a specification for discovery. but not for yaml.