Hi. I (hopefully for the last time) return to the topic.
I found a better (maybe the right) solution for me. The previous solution with the additional automation was not entirely satisfactory for me. But now I have found a way to edit the blueprint so that the error messages in question no longer appear.
I have supplemented the relevant section of the blueprint with another condition (in front of the existing one). This is what it looks like now:
condition:
- condition: template
value_template: >-
{{ as_timestamp(now()) - as_timestamp(states.binary_sensor.zigbee2mqtt_bridge_connection_state.last_changed) | int > 30 }}
- condition: template
value_template: >-
{{ ('release_' in trigger.payload_json.action and trigger.payload_json.elapsed is defined)
or 'press_' in trigger.payload_json.action }}
This ensures that the blueprint/automation is only rendered when the connection z2m (for example after a system restart) has already existed for 30 seconds. If it takes longer in the future due to further integrations, you can quickly change the value in the blueprint.
It’s actually quite easy if you know what you need to change and how. That took me a while. But now I’m happy.