Show value from script

Hi,
Is it possible, and if so, how to show in frontend a value from the script, automation?
Case 1. I have an automation that has a wait step, and I would like to show on dashboard how much time left on wait step.
Case 2. I would like to do some calculations (for heating control) in a script. how may I display in frontend value of a variable?

Thanks for any help and suggestions.

What’s a “wait step”?

Are you referring to wait_template, wait_for_trigger, or delay? None of them allow you to report the remaining time.

The script’s final step would be to set the value of an Input Number helper (which can be displayed in the UI).

Sorry, I mean the ‘Delay’ Sequences step.