Hi there!
I think I have a rather specific problem with repeat until logic.
My automation looks as follows:
alias: Fenster offen!
description: ''
variables:
time: -5
timedelay: 5
trigger:
- platform: state
entity_id:
- binary_sensor.req0542232_state
- binary_sensor.req0542255_state
- binary_sensor.req0542235_state
- binary_sensor.req0542213_state
- binary_sensor.req0542146_state
- binary_sensor.peq0569322_state
from: off
to: on
condition: []
action:
- repeat:
sequence:
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- variables:
time: '{{ time + timedelay }}'
- service: input_text.set_value
data_template:
entity_id: input_text.message_title
value: Fensterwarnung
- service: input_text.set_value
data_template:
entity_id: input_text.message_text
value: >-
{{ trigger.from_state.attributes.friendly_name }} ist seit {{ time
}} Sekunden offen.
- service: script.send_message
until:
- condition: state
entity_id: "{{ trigger.entity_id }}"
state: off
mode: restart
max: 20
… as you can see, I am trying to accomplish a window open warning, which can be triggered by either of my windows opening.
I would like to repeat this message (ideally displaying the correct time for how long it is already open) with the stop condition being the closing of said window. However, when I am trying to save the code above, I get the error message that the entity_id is invalid: “Message malformed: Entity {{ trigger.entity_id }} is neither a valid entity ID nor a valid UUID for dictionary value @ data[‘action’][0][‘repeat’][‘until’][0][‘entity_id’]”.
However what I don’t get is why the friendly name of the trigger can be evaluated, but the entity_id cannot.
Could anybody help me please? I also searched this forum, but I couldn’t find a solution. I think my problem is that I have mulitple triggers…
Thanks a lot in advance!
Patrick
1 post - 1 participant