Hue motion sensor API for other automation

Dear All,

I tried to used the rest platform to create an automation, I can only rescue the “presence” true or false, but I don’t know like associate true to automation.

   - platform: rest
     resource: http://172.16.232.1/api/key/sensors/15
     value_template: "{{ value_json.state.presence }}'
     name: "Hue Motion"

Could you help me?