Perform update of an entity used in the message of an alert

I have an alert, based on an binary_sensor which sends a telegram message.
The telegram message includes the data (state and some other attributes) of another sensor.
Now I want to be shure that, the used sensor data in the message are updated before they are sent.
Otherwise it’s possible that some “old” wrong data are used …

I know how to do it using an “automation”, here I perform a service call to “homeassistant.update_entity” on the entity before sending it, but how can I do the same in an alert?!

Regards,
Daniel.

Unfortunately this seems to be out of scope for alert integration. It can only send messages. It cannot do things like service calls.
Alerts for easy things. Automations for anything advanced.

Why would the sensor data be old? Perhaps you need to change the update interval of the sensor so this doesn’t happen in the first place

Because I have one binary_sensor indicating an error and another sensor including the error message, error timestamp, etc. Both implemented by a REST request.

The binary_sensor is updated much more ofter, the other sensor only once an hour, because it’s only needed on error.

So I try to reduce the load …