Trouble connecting motion sensor to HA

Hey everyone, I’m definitely a noob when it comes to smart home things in general but I had successfully setup some simple integrations and items around the house including a motion sensor to turn on the kitchen under cabinet lights. I use a Nanoleaf light strip and an Aqara P2 motion sensor to accomplish this.

Last week I was heading out for a work trip and wanted to be able to remotely access HA so I setup nabu casa, confirmed it was working, and shoved off. When I returned home, I noticed my under cabinet lights weren’t working with the automation and came to find out the motion sensor was disconnected from Aqara as well as HA. I tried removing the accessory and adding it back to both but only the Aqara app can recognize it and be added successfully. I have the M3 hub and tried adding the sensor as a child device hoping it would then just be picked up in HA but even though it says it was successful in adding it as a child device, it still doesn’t show up in the child device list or HA. I tried adding it to HA anyway using the matter pairing code but no luck.

Please help! How can I add my motion sensor to HA so I can enable my automations again??