Sensor with names sometimes fail to udate

Below is part of my configuration.yaml file (siplified version), and there are some glithches that I dont understand why they happen.
When I used “sensor weatherstation:” in stead of “sensor weather:” the values remained unknown and didn’t want to update. Is there a limit to the sensor name length ?
Then it also seemd to sometimes fail untill I updated my last sensor from “sensor:” to “sensor other:”. Since then, al sensors seem to update although not always in the time frame I would expect.
The manuals on the webiste are a bit vague (for a beginer like me at least), and all the info I find just uses 1 sensor entry. Can anyone point me in the right direction?

# ========== Sensor higrow ==========
sensor higrow:
  - platform: mqtt
    name: "Soil humidity"
    state_topic: "higrow/terra"
    value_template: "{{ value_json.soil.soil }}"
    unit_of_measurement: "%"
    icon: mdi:water-percent
  - platform: mqtt
    name: "Temperature"
    state_topic: "higrow/terra"
    value_template: "{{ value_json.temp.temp }}"
    unit_of_measurement: "C"
    icon: mdi:home-thermometer
# ========== END Sensor higrow ==========

# ========== Weather Station ==========
sensor weather:
  - platform: mqtt
    name: "Temperature"
    state_topic: "weatherstation/temperature_outside"
    unit_of_measurement: "°C"
    device_class: temperature
  - platform: mqtt
    name: "Humidity"
    state_topic: "weatherstation/humidity_outside"
    unit_of_measurement: "%"
    device_class: humidity
# ========== END Weather Station ==========

sensor other:
  - platform: cpuspeed
    name: CPU
  - platform: systemmonitor
    resources:
      - type: memory_use_percent
      - type: processor_temperature
      - type: processor_use

I believe the problem is that you have defined two sensors with identical names.

sensor.temperature is defined here:

sensor higrow:
  - platform: mqtt
    name: "Temperature"
    state_topic: "higrow/terra"
    value_template: "{{ value_json.temp.temp }}"
    unit_of_measurement: "C"
    icon: mdi:home-thermometer

sensor.temperature is also defined here:

sensor weather:
  - platform: mqtt
    name: "Temperature"
    state_topic: "weatherstation/temperature_outside"
    unit_of_measurement: "°C"
    device_class: temperature

Putting one under sensor higrow and the other under sensor weather doesn’t change the fact it’s two entity configurations sharing the same name.

You will get unpredictable behavior after a restart or Reload Template Entities as Home Assistant attempts to sort out which one of the duplicates it creates/rejects.

I see what you mean. I changed it to

name: "Temperature (ws)"
name: "Temperature (higrow)"

But that is also displayed in lovelace now.
I can change it when I create a card with a single entity, by filling in the “Name (optional)” field.
But when I use the multiple entities card, there is no such option.
I tried using “friendly_name” in the yaml file, but HA doesn’t seem to accept that.
How do I proceed from here ?

In the Entities Card, click the pencil icon next to the entity_id and the popup box lets you enter a name.

Wow, I feel (more than) a little silly now. Thank you for your patience :slight_smile: