[seconds] is an invalid option for [automation]

Hi everyone,

Today I did the HASS update to 88.1 and found this error in my log:

Invalid config for [automation]: [seconds] is an invalid option for [automation]. Check: automation->trigger->0->seconds…

Did I miss something about the Time Trigger support in automations?

This is the automation that stopt working:

alias: "HASS Startup Status"
initial_state: true
hide_entity: false
trigger:
  - platform: time
    seconds: "/15"
action:
  - service: switch.turn_on
    entity_id: switch.remote1vijverpomp
  - service: switch.turn_on
    entity_id: switch.wandschakelaarvijverpomp
  - service: script.turn_on
    entity_id: script.dahua_preset_oprit
  - service: automation.turn_off
    entity_id: automation.HASS_Startup_Status

I need this automation to reset the status om some sensors, after a HASS reboot.
The script must run 15 seconds after HASS startup, the script in the action list will kill the automation.

Any help is appreciated :slight_smile:

You’ll have to use the new “time_pattern” trigger. This has changed recently: https://www.home-assistant.io/docs/automation/trigger/

That was a easy fix, thanks

alias: "HASS Startup Status"
initial_state: true
hide_entity: false
trigger:
  - platform: time_pattern
    seconds: "/15"
action:
  - service: switch.turn_on
    entity_id: switch.remote1vijverpomp
  - service: switch.turn_on
    entity_id: switch.wandschakelaarvijverpomp
  - service: script.turn_on
    entity_id: script.dahua_preset_oprit
  - service: automation.turn_off
    entity_id: automation.HASS_Startup_Status

If the goal is to run a script 15 seconds after Home Assistant starts, this is a very curious choice of trigger:

  - platform: time_pattern
    seconds: "/15"

The / in "/15" means to run every 15 seconds. Here’s the documentation link:

Here’s an example of an action that executing a service 5 seconds after Home Assistant starts:

- alias: 'Start HomeKit'
  hide_entity: true
  trigger:
    - platform: homeassistant
      event: start
  action:
    - delay: 00:00:05  # Waits 5 sec
    - service: homekit.start

If we apply the same technique to your automation we get this:

- alias: "HASS Startup Status"
  initial_state: true
  hide_entity: false
  trigger:
    - platform: homeassistant
      event: start
  action:
    - delay: 00:00:15
    - service: switch.turn_on
      entity_id: switch.remote1vijverpomp
    - service: switch.turn_on
      entity_id: switch.wandschakelaarvijverpomp
    - service: script.turn_on
      entity_id: script.dahua_preset_oprit
    - service: automation.turn_off
      entity_id: automation.HASS_Startup_Status

I had it like that before, but it was not stable, HASS startup did not always trigger.
My automation will only run ones when it is triggered, because in the actions there is a script that disabled the automation.

Which version of Home Assistant are you using?

If it ‘did not always trigger’ it implies the event was not created or was not recognized by the automation’s trigger. Either way, that would be a serious bug.

For reference, I’m using 0.80 and the `Start HomeKit’ automation I posted above. It has always worked.