Dynamic device and entity naming #1598
jesserockz
started this conversation in
Ideas
Replies: 1 comment
-
Some research: We would be changing |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What?
An idea that has floated around for a while now and does not make it very far is for devices to have a "dynamic" name, like appending the mac address to the the hostname which is not known at compile time, as it is unique to the device it is flashed to.
Why?
The main reason for wanting to do something like this is to allow makers (or anyone else) to compile once, flash many while having unique devices on both the network and in Home Assistant.
Problems
This is an easy problem to solve and can be done with minimum code changes. The issues we face with this though are:
name: "${friendly_name} Temperature"
Solutions
The first choices that come to mind for entity names/ids are:
esphome
->mac_name: true
in YAML which suffixes the mac address to the devicename/hostname and either prepends or appends all entity names. eg:name: ${friendly_name} Temperature
becomesLounge Temperature 123456
__mac__
which will be replaced atsetup()
time with the actual mac addressBeta Was this translation helpful? Give feedback.
All reactions