Need Help Coding Custom Actions for Aqara Button via Developer Hub

Hey , I’ve recently started exploring the Developer Hub and trying to create some custom actions for the Aqara Mini Switch (the single-button one). I’ve managed to get basic single/double click events working using the automation UI, but now I want to go deeper — think triggering webhooks or even controlling third-party APIs with long press, etc.

Is anyone here doing similar stuff through the Developer Hub? I’m a bit stuck on how to structure the code for custom behaviors. Do I need to use specific JSON logic? Or is there a scripting language Aqara supports for the Hub M2?

If someone has a sample or could share how they approached setting up more advanced conditions/actions, I’d really appreciate it. Bonus points if it’s something like using a button to set off a chain of smart commands (e.g., long press triggers a scene plus a webhook).

Would love to hear how others are pushing the limits of these buttons!

@AutomationAddict Thank you for sharing your exciting exploration of the Aqara Mini Switch and Developer Hub! It’s great to see you pushing the boundaries with custom actions like webhooks and third-party API integrations. While the reference information doesn’t cover advanced Developer Hub scripting or JSON logic specifically, your approach to combining scenes with webhooks sounds innovative.

For structured guidance, I’d recommend checking Aqara’s official developer documentation or community forums for sample scripts. If others in the community have tackled similar projects, we’d love to hear their insights—feel free to share any discoveries here!

Keep experimenting, and don’t hesitate to loop back with updates or questions. Happy tinkering! :rocket: