Automation help - Unifi Protect to Homekit

Hello, .
i believe i am in the right place. i am new to HA, and i have no knowledge about Python.

Basiclly what i want to do is that when my Homekit alarm is set to away then i will get motion notifications from my Protect app. i could have an entity in HA which will change when the homekit alarm status is changed.

so what i need is help with creating the Python script, and a way to run it from homekit or from HA.

hope you can help me with this.

thanks.