mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 16:27:19 +00:00
Removed entity_id
This commit is contained in:
parent
24d71bcc96
commit
b84809545e
@ -46,10 +46,6 @@ sensor:
|
|||||||
description: Name to use in the frontend.
|
description: Name to use in the frontend.
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
entity_id:
|
|
||||||
description: Add a list of entity IDs so the sensor only reacts to state changes of these entities. This will reduce the number of times the sensor will try to update its state.
|
|
||||||
required: false
|
|
||||||
type: string, list
|
|
||||||
unit_of_measurement:
|
unit_of_measurement:
|
||||||
description: Defines the units of measurement of the sensor, if any.
|
description: Defines the units of measurement of the sensor, if any.
|
||||||
required: false
|
required: false
|
||||||
@ -71,12 +67,11 @@ sensor:
|
|||||||
## {% linkable_title Considerations %}
|
## {% linkable_title Considerations %}
|
||||||
|
|
||||||
If you are using the state of a platform that takes extra time to load, the
|
If you are using the state of a platform that takes extra time to load, the
|
||||||
Template Sensor may get an `unknown` state during startup. This results
|
Template Sensor may get an `unknown` state during startup. To avoid this (and the resulting
|
||||||
in error messages in your log file until that platform has completed loading.
|
error messages in your log file), you can use `is_state()` function in your template.
|
||||||
If you use `is_state()` function in your template, you can avoid this situation.
|
|
||||||
For example, you would replace
|
For example, you would replace
|
||||||
{% raw %}`{{ states.switch.source.state == 'on' }}`{% endraw %}
|
{% raw %}`{{ states.switch.source.state == 'on' }}`{% endraw %}
|
||||||
with this equivalent that returns `true`/`false` and never gives an unknown
|
with this equivalent that returns `true`/`false` and never gives an `unknown`
|
||||||
result:
|
result:
|
||||||
{% raw %}`{{ is_state('switch.source', 'on') }}`{% endraw %}
|
{% raw %}`{{ is_state('switch.source', 'on') }}`{% endraw %}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user