@knorian wrote:
I am a newbie in HA. short to the project. I would like to install a HC-SR04, on a d1 mini with tasmota, in a post box, so that I get an info if it is full. Values in HA are already shown to me. I do not, however, realize that the correct status is displayed to me. it is always displayed fully
#postkasten - platform: template sensors: postkasten: friendly_name: "Postkasten" value_template: >- {% if is_state('sensor.sonoff_sr04_distance', '> 10') %} leer {% else %} voll {% endif %} icon_template: >- {% if is_state('sensor.sonoff_sr04_distance', '> 10') %} mdi:email {% else %} mdi:email-check {% endif %}
Thanks!
Posts: 2
Participants: 2