Using friendly name instead of entity_id

Hi I have groups set up using entity_id.
Wanted to rename all the entity ID’s to friendly names just to make it more simple.
Now when restarting HA I get devices not found in all_lights in my main lovelace overview page.
What went wrong?

here it how it was which worked
in configuration file before and after I had/have this

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

In groups before which worked I had this

all_Light:
    name: all_lights
    entities:
      - light.53411381807d3a59486b #bedroom
      - light.53411381807d3a59491c #family room
      - light.73371318ecfabc9a8f79 #Guest Bedroom

changed to this

all_Light:
    name: all_lights
    entities:
      - light.Bedroom
      - light.family_room
      - light.guest_bedroom

Also when using the same names in automation nothing works any more ex

worked

- alias: Turn on picture, fence lights
  trigger:
    - platform: sun
      event: sunset
      offset: "-01:00:00"
  action:
    service: homeassistant.turn_on
    entity_id:
      - switch.20808347bcddc2975adf #Fence light
      - switch.0673468284f3ebbbd7f7 #picture light

now doesn’t work

- alias: Turn on picture, fence lights
  trigger:
    - platform: sun
      event: sunset
      offset: "-01:00:00"
  action:
    service: homeassistant.turn_on
    entity_id:
      - switch.Fence_light
      - switch.picture_light

I think you can’t have capital letters. Some one will correct me…

According to the screenshot you haven’t changed the entity_id, it’s still light.53411381807d3a59486b

1 Like

yes I thought also that was the problem but changed to small caps and same thing. Also the ones which already were small caps are not working

You did not change the entity if and you can’t just take the friendly name of a device in your configuration.

2 Likes

hmmm I thought the Entity_id needs to stay as is as it is a unique name and just use the name overide

No, you need to read up a bit more on how homeassistant works. Everything you do with an entity relies on it’s entity_id, but you can change the entity_id to something more suitable.

And if you change the name of the entity_id, it will offer to rename all related devices :wink:

1 Like

ok thanks I will try that. thanks to all I will get back here if still problems

1 Like