This entity does not have a unique ID, therefore its settings cannot be managed from the UI - again

I’m really at a loss here; new HA user here, but really struggling to understand simple things due to weird error messages…

The last one I’m running into is:
“This entity does not have a unique ID, therefore its settings cannot be managed from the UI.”.

What does it mean? How to fix it? Afaik, everything I am doing is right, however the UI just refuses to deal with this entity. I read a few thread about YAML starting to be deprecated, but it was one of those TL/DR moments… If indeed YAML cannot be used to define an entity, then HA is of not much use to me.

So, if someone can explain what the issue is and how can I fix it, I would really appreciate it.

Full description of the issue:
YAML definition:
UI:

          - title: Supplies
            type: horizontal-stack
            cards:
              - max: 10
                min: 0
                theme: default
                entity: sensor.muriatic_tank
                severity:
                  green: 5
                  red: 1
                  yellow: 3
                type: gauge

Sensor:

sensor:
  - platform: template
    sensors:
      muriatic_tank:
        friendly_name: "Muriatic tank"
        value_template: "{{ states('input_number.muriatic_tank')|round(2)}}"

Developer Tools:
(new users cannot post more than one image !?!?!?)

UI error:
Screen Shot 2020-07-23 at 2.03.56 PM

TIA

The message states the situation plainly, only entities that have a unique_id defined can be managed from the UI.

You have defined a Template Sensor called sensor.muriatic_tank and, currently, one cannot specify a unique_id for a Template Sensor (or any Template-based entity). However, there’s a PR in the works to add this functionality. When implemented, you can continue to use YAML to define the Template Sensor but also specify a unique_id.

Thank you, I appreciate the very quick response! I will monitor that PR.

I am still confused about which all entities accept a yaml definition, and I have to say, that message without a way to resolve it is very confusing IMO.

1 Like

What’s to resolve? You defined a Template Sensor in YAML, just continue to edit it in YAML. If you want to also be able to edit it in the UI, you can’t currently do that. The message could simply state “Cannot modify this entity in the UI”. However, it attempts to explain why you cannot edit it in the UI.

What I’d like to see is the ability to create a Template Sensor in the UI. The resulting entity will be automatically assigned a unique_id and its configuration stored in the entity registry (which is not in YAML). This type of entity is immediately available upon creation and doesn’t require restarting Home Assistant. That’s currently how input_number, input_select and other “Helpers” can be configured. I recall seeing a PR to implement this functionality but I don’t believe it was ever completed.

I get exactly the same error with auto-discovered light switches.
If I add the light from my original light.yaml file that worked perfectly well I still get the error.
so something appears to have gone wrong.