Help with Error: expected float for dictionary value @ data['volume_level']

I noticed that my old automation stopped working.
In traces I see error:

Error: expected float for dictionary value @ data[‘volume_level’]

In automation use variable to store initial speaker volume:

variables:
  volume: "{{ state_attr(\"media_player.nest_mini\", \"volume_level\") }}"

and later I set volume using this variable to target device in Level field

{{ volume }}

What should I change to fix this?

{{ volume | float }}
1 Like

Thanks! Looks like it fixed the problem.
But now nest mini can’t play Piper TTS at all.