#Guarantee entity name from sensor in YAML
1 messages · Page 1 of 1 (latest)
essentially how does HA link my YAML code with the internal entity_id structure, if I modify the sensor in the future, for example
in general there is not really any reason it would change. however if you create the sensor in yaml in the config file then you can specify an entity ID with the unique_id tag
but is the "rule" that once you set the sensor name: My Sensor Name I am not supposed to change it anymore in the YAML ?
heres an example of one i have in my config file
sensor:
- name: "Kitchen Alexa Timers Info"
unique_id: "kitchen_alexa_timers_info"```
this means the sensor will definetly be `sensor.kitchen_alexa_timers_info`as thats the unique id
if it was instead unique_id: "dancing_panda" the sensor would be sensor.dancing_panda
if you dont put in a unique id it autogens which i guess you are worried about changing. so if you manually specify then you wont have that issue
yeah that should prevent any issues
it would be super rare that stuff would change anyway but for "mission critical" stuff then putting it in nails it down
Yes, that's the one worry, and another one is if HA will always generate same entity_id from the name, in case unique id is not specified.