Battery Philips hue motion sensor

Hello all,
I’m all new here.
Am experimenting a bit with home assistant.
Now I am trying to make an automation that sends a message to my iphone when the batery of the philips hue motion sensor goes below 20%. I have already tried several things and searched the internet but cannot find a solution immediately. the problem is that I don’t get a choice about the batery in the automations (see appendix).
Would someone be so kind to help me step by step so that I can understand Home Assistant a little better and can further automate with it. Love in Dutch because my English is not great!

I can see the batery status! (see bat 2)

Templating - Home Assistant (home-assistant.io)

state_attr('device_tracker.paulus', 'battery') will return the value of the attribute or None if it doesn’t exist.