Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {% if is_state('binary_sensor.gate_closed', 'off') and is_state('binary_sensor.gate_open', 'on') %}
- closed
- {% elif is_state('binary_sensor.gate_closed', 'on') and is_state('binary_sensor.gate_open', 'off') %}
- open
- {% elif is_state('binary_sensor.gate_closed', 'on') and is_state('binary_sensor.gate_open', 'on') %}
- {% if states.binary_sensor.gate_closed.last_changed > states.binary_sensor.gate_open.last_changed %}
- opening
- {% else %}
- closing
- {% endif %}
- {% endif %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement