WTH - ID and name of YAML sensors

When creating a sensor in the configuration.yaml, contrary to my expectation giving a unique_id does not in fact relate to the entity_id this sensor gets if name is provided. As the name can be based on the template, it can become quite difficult to find the sensor as it’s not known for sure which is the first value after setup. On the other hand, name also acts as the friendly_name here like it’s used in other occations.
After some research, if found that this issue has already been discussed here.
In my opinion this distinction should be made clearer to avoid confusions. Name cannot be both the source for entity_id and friendly_name.
I could think of making the unique_id mandatory and using it as the source for creating the entity_id. Second, I would change the name to friendly_name to emphasize its meaning.

Name does not accept templates accept for the template integration.

Yes, you’re right. I mislooked that. It’s in the template integration. However, it still bothers me :slight_smile: