How are states called in lock?

Hello, I have sensor of mobile locked (via HA Android app). In GUI it show states active and inactive in their localized version. I created trigger based on state change of that lock sensor from “off” to “on”, but that does not trigger. Then I used localized variants from “inactive” to “active”, but trigger does not work either. So how the states need to be called in automation gui, do they need to be in quotes?

Check what the real state is in developer tools. You should not need quotes for strings in YAML unless the string contains special characters (e.g. :).

Pretty sure it is ‘locked’ and ‘unlocked’. But as advised above check the developer tools states menu:

Open your Home Assistant instance and show your state developer tools.

Thanks, it was on and off. There was another problem. I used time “3min” as I am used from esphome and that did not work, I had to use “00:03:00”.

You can also use:

  minutes: 3

If you use yaml and not the UI editor.