Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95273

HC-SR04 in Postbox

$
0
0

@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

Read full topic


Viewing all articles
Browse latest Browse all 95273

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>