is it possible to define a friendly name addionally to the “name” in esp home?
I don’t mean the friendly name for the esp device, i mean all the switches, sensors etc. belonging to that esp.
I would like to have an entity id and a separate friendly name. At the moment there is only the possibility of “name” in esp home, which is both entity id and friendly name in home assistant.
I might be misunderstanding your question, but the screen grab you show is not from ESPHome but from Home Assistant: it shows the Properties in Home Assistant of a specific entity that comes from an ESPHome device.
When you leave the “Name” field in this Properties window empty Home Assistant will automatically use the name as defined in the ESPHome yaml file.
You can see this when you just click in the empty Name field: it will show the defined name.
When you fill this field with some other name it will be used instead of the ESPHome name.
In the ESPHome yaml file you can indeed define a friendly_name.
This can be used as name for the device, but it can also be used as pre-fix for the ESPHome entities. See: ESPHome Core Configuration variables.
You can also define a “id” for sensors in the ESPHome yaml file, which can be used internally in the ESPHome code. See: Base Sensor Configuration.
This is an example of how this could be done in the ESPHome yaml file:
For instance the entity for the BME280 temperature sensor will be named “NiceName BME280 Temperature“ in this case.
The id in the yaml file is used to define an extra sensor giving the temperature in Fahrenheit.
I understand what you are saying, but I thing I didn’t describe the problem clear enough.
In HomeAssistance I have an Entity ID and a friendly name. I would like to have the same possibilities with ESP Home, so that when I’m integrating the esp in home assistant, I don’t need to rename every entitie.
Explanation:
I have a bigger garden with around 40 water valves. All of them are controlled by different ESP-Home-Devices (same software-code, just different name), which have each around 50 entities (switches, time-sensors / duration-templates etc. for each water valve etc.)
All of them are prefixed with the name of the ESP like “irrigation_south_valve_01”, “irrigation_south_valve_02”… etc.
In my homeassistant-dashboard, I don’t want to have shown all those long names with the prefixed name, I just want to have a dashboard-tab for lets say irrigation south and in that tab alle the Valves with a short or friendly name: “Valve 1”, “Valve 2” etc.
At the moment I have to give all of the 200+ entities in home assistant a friendly name to change the name from “irrigation_south_valve_01” to “Valve 01”.
I would like to give all of the entities friendly names inside of esp home, which would be much more easier instead of having the trouble of renaming each entites with a friendly name within home assistant.
Does the suggestion of @zoogara work for you? Use your ESPHome name as the friendly input. I can see your problem where you have multiple entities on one zone; but not all those entities will show up on your dashboard as they WILL need unique names for background automations etc. Somebody might have a better solution
Ok - so you have the same name on several ESPhome devices, so HA is forced to create a unique ID because it can’t handle duplicates.
Do what @thusassistint said and use substitutions. Prefix the name: in ESPhome with the name of the device, or some other unique identifier. Your code will be the same on every device except for the substitution value.