The above/below conditions no longer match equal values (#2757)

This commit is contained in:
Anders Melchiorsen 2017-06-04 18:46:55 +02:00 committed by Fabian Affolter
parent 476449131c
commit 6c3476ae95
2 changed files with 5 additions and 5 deletions

View File

@ -75,15 +75,15 @@ automation:
# if light is off, force a 0, otherwise use the brightness value
value_template: {% raw %}'{% if states.light.livingroom_ec.state == "on" %}{{ states.light.livingroom_ec.attributes.brightness }}{% else %}0{% endif %}'{% endraw %}
# brightness below 50% (255 = 100%)
below: 127
below: 128
- condition: numeric_state
entity_id: light.kitchen_bar
value_template: {% raw %}'{% if states.light.kitchen_bar.state == "on" %}{{ states.light.kitchen_bar.attributes.brightness }}{% else %}0{% endif %}'{% endraw %}
below: 127
below: 128
- condition: numeric_state
entity_id: light.kitchen_ceiling
value_template: {% raw %}'{% if states.light.kitchen_ceiling.state == "on" %}{{ states.light.kitchen_ceiling.attributes.brightness }}{% else %}0{% endif %}'{% endraw %}
below: 127
below: 128
# Trigger a scene
# You could add as many services or scenes as you'd like

View File

@ -68,9 +68,9 @@ condition:
### {% linkable_title Numeric state condition %}
This type of condition attempts to parse the state of specified entity as a number and triggers if the value matches all of the above or below thresholds.
This type of condition attempts to parse the state of specified entity as a number and triggers if the value matches the thresholds.
For above, the condition passes if `value >= above`. For below, the condition passes if `value <= below`. If both `below` and `above` are specified, both tests have to pass.
If both `below` and `above` are specified, both tests have to pass.
You can optionally use a `value_template` to process the value of the state before testing it.