Automation on Apple Home

Hi all,
I try the homebridge plug-in to use my home assistant entity into apple home app.
I’m finding some trouble with automation entity that I use to control light.
When I toggle the state inside apple home app, the automation is not triggered, but it is disabled.
If I toggle again the state, the automation is enabled.
Am I doing something wrong?
Can you help me to understand how to trigger the automation?
Thank you