I have a working binary_sensor.
It turns sensor.warmtepomp_boiler ‘on’ or ‘off’
I want an extra condition added to this:
is_state('binary_sensor.qbus_status_warmtepomp', 'off')
This should only be valid when this state is off for 60 seconds, and not immediately, like it is now.
Browsing the forum, I found that I have to add something like:
if trigger.for.seconds|int >= 60
and I have to change
is_state
into to_state
But how do I get this in this template, I’m not sure about the correct placing and syntax.
binary_sensor:
- platform: template
sensors:
warmtepomp_boiler:
friendly_name: Warmtepomp Boiler
value_template: >
{% if is_state('binary_sensor.qbus_status_warmtepomp', 'off') and (states('sensor.flukso_warmtepomp_vermogen')|int > 500) %}
on
{% else %}
off
{% endif %}
Thank you