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