Help with Jinja to Filter JSON

Hi there, could someone please point me into the right direction. I have following sensor.
This template

{{ state_attr('vacuum.heinrich', 'battery')  }}


{'cycles': {'total': 2021, 'current': 0, 'reset_at': None, 'reset_time': None}, 'temperature': 24.1, 'voltage': 19.66, 'percent': 100, 'charging': False}

My question is simple:
How do I filter this to get just the value of ‘percent’ (100) so I can use it as a battery sensor.

Does this work?

{{ state_attr('vacuum.heinrich', 'battery').percent  }}
1 Like

it does, thank you!

1 Like