I want to trigger a cover only if it necessary, that means only if the target position is not the current position.
So the relevant part of the action of my blueprint looks as follows
action:
service: >
{% set curTime = now().time() %}
...
{% if is_state('binary_sensor.daylight', 'off')
or curTime >= closeTime.time()
or curTime < openTime.time() %}
{% if is_state( coverEntityVar, 'closed') %}
script.do_nothing
{% else %}
cover.close_cover
{% endif %}
{% else %}
{% if is_state( coverEntityVar, 'open') %}
script.do_nothing
{% else %}
cover.open_cover
{% endif %}
{% endif %}
In general this is working.
But it is not working for a group if not all cover in a group have the same state.
I think a loop over the entity_id of a group could be the solution, but haven’t found a way how to include this in my blueprint.
Another way, I think, could be to use a Template Cover for each cover which adjusts itself only if the target position is not yet the current position.
But I was hoping, that there is a more elegant way.
Thanks for your help.
Peter