Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
---
sensor:
- platform: template
sensors:
car_back:
value_template: >-
{% if states('sensor.car_position_back')|float > 0.50 and states('sensor.car_position_centerb')|float > 0.50 %}
on
{% else %}
off
{% endif %}
car_center:
value_template: >-
{% if states('sensor.middleb')|float > 0.50 and states('sensor.car_position_centerf')|float > 0.50 and is_state("sensor.car_front", "off") and is_state("sensor.car_back", "off") %}
on
{% else %}
off
{% endif %}
car_front:
value_template: >-
{% if states('sensor.car_position_front')|float > 0.50 and states('sensor.car_position_centerf')|float > 0.50 %}
on
{% else %}
off
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.