Distinguish iOS focus modes

Hey guys,

I’d like to call a script when the Sleep mode is ON.

Is there a way to understand which focus mode has been enabled/disabled.
My phone show the following logs regardless if I enable Do Not Disturb or Sleep.

Vlad iPhone 14 Pro Focus turned off
11:13:57 - 6 minutes ago
Vlad iPhone 14 Pro Focus turned on
11:13:32 - 6 minutes ago

Have you found a solution? I’m also looking at this and the only thing I’ve found is to use shortcuts to send an event to HA when focus changes

No. I’ve added an automation based on focus on event.