I want to do the same thing. I have a scene with one entity and setting a state.
I would like to read this parameter. I tried this with templates, but I’m not getting it done.
Here is what I tried:
{% for entity_ids in state_attr('scene.test', 'entity_id') -%}
{{ state_attr(entity_ids, 'current_position') }}
{%- endfor %}
This works, but it print the current state of the entity and not the state that is defined in the scene.
I got a solution to the problem. Instead of using a scene, I created a script to do the actions. The script gets its target value via a helper input_number. In the end, I can read the helper input_number again in another template like in a automation. One plus, now I can have a slide to adapt the target value.