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

Set default for sensor template at startup

$
0
0

I have a sensor template that has a delay_off. Therefore, if the state at startup is not on it will be unknown. Which kind of makes sense, because it is not off for 1800 s.

The sensor should be off at startup.
How can I fix that?

    - name: "test 1"
      unique_id: "test_1"
      unit_of_measurement: ""
      delay_off:
        seconds: 1800
      state: >
        {% if states('sensor.temperatur_test')|float > 5 %}
          {{ "on" }}
        {% else %}
          {{ "off" }}
        {% endif %}

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 108752

Trending Articles



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