When creating templated sensors in YAML, we can easily end up with dozens (hundreds) of them defined in various files. It may become hard to maintain over time.
I use to add an attribute “source_file” in the customize; e.g.
customize:
sensor.external_ip_address:
icon: mdi:ip-network
friendly_name: "Adresse IP externe"
source_file: package_rest.yaml
HA could add this attribute automatically. Doing so, there would be no risk of forgetting it!