Advertisement
energywave

Home assistant - Stato contenitore pieno/parziale/vuoto

Dec 6th, 2020 (edited)
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.44 KB | None | 0 0
  1. sensor:
  2.   - platform: template
  3.     sensors:
  4.       stato_serbatoio:
  5.         friendly_name_template: "Stato del serbatoio"
  6.         value_template: >
  7.          {% if is_state("binary_sensor.vuoto", "on") and is_state("binary_sensor.pieno", "on") %}
  8.           pieno
  9.           {% elif is_state("binary_sensor.vuoto", "on") and is_state("binary_sensor.pieno", "off") %}
  10.           parziale
  11.           {% else %}
  12.           vuoto
  13.           {% endif %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement