change example to pass true/false so it actually works, clarify snesor name, and fix broken links (#4084)

This commit is contained in:
Taylor Vierrether 2017-11-28 03:42:10 -05:00 committed by Fabian Affolter
parent 800e28429c
commit 286d156439
No known key found for this signature in database
GPG Key ID: DDF3D6F44AAB1336

View File

@ -119,7 +119,7 @@ The meaning of the `alarm_level` entity depends on the nature of the alarm senso
- **254**: Deep sleep
- **255**: Case open
If your device has an `access_control` entity, but not a `binary_sensor` equivalent, you can use a [template binary sensor](omponents/binary_sensor.template/) to create one:
If your device has an `access_control` entity, but not a `binary_sensor` equivalent, you can use a [template binary sensor](/components/binary_sensor.template/) to create one:
```
binary_sensor:
@ -128,10 +128,10 @@ binary_sensor:
YOUR_SENSOR:
friendly_name: "Friendly name here"
value_template: >-
{% raw %}{%- if is_state('sensor.YOUR_SENSOR_access_control', '22') -%}
on
{% raw %}{%- if is_state('sensor.YOUR_ORIGINAL_SENSOR_access_control', '22') -%}
true
{%- else -%}
off
false
{%- endif -%}{% endraw %}
```
@ -147,7 +147,7 @@ binary_sensor:
- **254**: Deep sleep
- **255**: Case open
If your device has an `burglar` entity, but not a `binary_sensor` equivalent, you can use a [template binary sensor](omponents/binary_sensor.template/) to create one:
If your device has an `burglar` entity, but not a `binary_sensor` equivalent, you can use a [template binary sensor](/components/binary_sensor.template/) to create one:
```
binary_sensor: