esphome / esphome/feature-requests

Request for friendly name for ESPHOME devices to use HA feature to reduce entity names

Open
#1,741 8 comments 16 reactions 0 assignees View on GitHub
enhancement
Dominant language
No language data
Stars
450
Forks
29
PR merge metrics
No merged PRs in 30d

Description

**Describe the problem you have/What new integration you would like**
I can assign the esphome device a name with:

```
substitutions:
upper_devicename: "Lampe Aussen Hausbeleuchtung"
devicename: "lampe-aussen-hausbeleuchtung" #(upper case and space not allowed)
esphome:
name: $devicename
```

but I cannot assign a friendly name for Home Assistant:
`friendly_name: ${upper_devicename} #--> doesn't work`

If I give e.g. a light entity a name:
```
light:
- platform: binary
[...]
name: "${upper_devicename} Balkon"
```

It doesn't show the right way in Home Assistant:
![image](https://user-images.githubusercontent.com/66269310/169696146-a67d058f-f791-4541-9e2f-a54eb6174e15.png)

If I rename the device name into the "friendly one" it works:
![image](https://user-images.githubusercontent.com/66269310/169696178-55308713-496b-4de4-867d-34f891b125ce.png)

So it would be nice to have a "friendly" device name with uppercase and spaces via the yaml code. That way the look in HA would be much cleaner

### Anything in the logs that might be useful for us?

```txt
nothing
```

**Additional context**
It would be an alternative, if the `esphome name` accepts upper case and spaces and translates to lowe case and "-" were needed.

If you would be able to set an uppercase device name via the yaml you can make use of the truncating in Home Assistant (would be much clearer)
**Please describe your use case for this integration and alternatives you've tried:**

Example YAML snippet
```yaml
substitutions:
upper_devicename: "Lampe Aussen Hausbeleuchtung"
devicename: "lampe-aussen-hausbeleuchtung"

esphome:
name: $devicename
# friendly_name: ${upper_devicename} --> missing?

light:
- platform: binary
id: light1
output: relay1
name: "${upper_devicename} Balkon"
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the provided substitutions and esphome YAML snippets, then trace how the device name and entity names are exposed to Home Assistant. Done means a configurable friendly device name with uppercase letters and spaces is preserved in Home Assistant without changing the machine-readable device name.

Written by the indexing model from the issue text.

Assessment

Tech stack
yaml
Domain
embedded-iot
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.