Automation trigger on a time less than a minute

After an hour of searching I figured id post the question. How to trigger an automation every 30 seconds or anything less than a minute.

A time pattern option means match the time set and then trigger. I need to trigger ever 30 seconds to check a sensor that gets missed when it changes state. HA misses it more then not. The 30 second scanner can get the sensors updated state instead of waiting for it to change state again.


https://www.home-assistant.io/docs/automation/trigger/#time-pattern-trigger

trigger:
  - time_pattern
    seconds: "/30"

Or if you are using the UI editor:

trigger:
  - time_pattern
    hours: "*"
    minutes: "*"
    seconds: "/30"
1 Like

In the trigger for the automation you can use “Time Pattern” as the trigger type, then you see Hours/Minutes/Seconds fields and can enter 30 in the seconds field.

That worked. Every 30 seconds I get a trigger.

So when using the Automation maker thingy we don’t leave the two entries for hour and minute empty.
We type * in each.
Then in the minute entry
We type /30

Pattern

Thanks tom_I