mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
Update sensor.template to show entity_id example (#4158)
Right now this page has no examples using the optional entity_id field. I think we should include it in the top example because otherwise the template sensor will react to all state changes rather than just the one or two the user will care about. May also be nice to show an example of a list for the template sensor, but we do include one on the Binary Sensor Template page so maybe that's sufficient?
This commit is contained in:
parent
ad76482635
commit
7097dea187
@ -27,6 +27,7 @@ sensor:
|
||||
sensors:
|
||||
solar_angle:
|
||||
friendly_name: "Sun angle"
|
||||
entity_id: sun.sun
|
||||
unit_of_measurement: 'degrees'
|
||||
value_template: "{{ states.sun.sun.attributes.elevation }}"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user