added note about name variable (#11970)

* added note about name variable

I though that name is just for frontend and spent some time finding out where my sensor had gone when I had changed its name.
Hope it will save others' time.
Actually, I don't think this component's approach is great - would be much more intuitive to have name as a key of a dictionary (as with template sensors, for example) and a friendly_name for UI.
Unfortunately, there are many of similar components - perhaps they are older than current template sensor's implementation?

* links -> relative

* ✏️ Tweak

Co-authored-by: Klaas Schoute <klaas_schoute@hotmail.com>
This commit is contained in:
akasma74 2020-02-06 09:22:02 +00:00 committed by GitHub
parent b073beb876
commit afd1e37956
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,7 +47,7 @@ state:
required: true
type: string
name:
description: Name displayed on the frontend.
description: Name displayed on the frontend. Note that it is used by Home Assistant to generate sensor's `object_id` so it is advisable to choose a unique one and change name for frontend using [customization](/docs/configuration/customizing-devices/#friendly_name) or via [Lovelace](/lovelace/entities/#name).
required: false
default: unnamed statistics
type: string