mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
is_state
needs quotes all the way (#6751)
Apparently `is_state` treats the value as a string
This commit is contained in:
parent
ca98712887
commit
7017eb4cd5
@ -161,7 +161,7 @@ binary_sensor:
|
|||||||
YOUR_SENSOR:
|
YOUR_SENSOR:
|
||||||
friendly_name: "Friendly name here"
|
friendly_name: "Friendly name here"
|
||||||
device_class: door
|
device_class: door
|
||||||
value_template: "{{ is_state('sensor.YOUR_ORIGINAL_SENSOR_access_control', 22) }}"
|
value_template: "{{ is_state('sensor.YOUR_ORIGINAL_SENSOR_access_control', '22') }}"
|
||||||
```
|
```
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
|
||||||
@ -187,7 +187,7 @@ binary_sensor:
|
|||||||
YOUR_SENSOR:
|
YOUR_SENSOR:
|
||||||
friendly_name: "Friendly name here"
|
friendly_name: "Friendly name here"
|
||||||
device_class: motion
|
device_class: motion
|
||||||
value_template: "{{ is_state('sensor.YOUR_SENSOR_burglar', 8) }}"
|
value_template: "{{ is_state('sensor.YOUR_SENSOR_burglar', '8') }}"
|
||||||
```
|
```
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user