Automation Trigger minutes an invalid operation?

So I’m trying to get a light to change color every hour here it is

- id: 'Lights Wake Up'
  alias: 1030 Lights On
  trigger:
  - at: '10:30:00'
    platform: time
  condition:
  - condition: state
    entity_id: group.lightupstairs
    state: 'off'
  action:
  - data:
      entity_id: group.lightupstairs
      rgb_color:
      - 60
      - 12
      - 255
      transition: 30
    service: light.turn_on
- id: 'ColorChange_lr_east'
  alias: LR Color 1130
  trigger:
    platform: time
    minutes: '/120'
    seconds: 00
  condition:
  -  after: '10:30:00'
     before: '03:00:00'
     condition: time
  action:
  - service: light.turn_on
    entity_id: group.all_lights
    data_template:
      hs_color:
        - "{{ range(360)|random }}"
        - "{{ range(80,101)|random }}"
      brightness_pct: 100

With this error

 automation: 
    - Invalid config for [automation]: [minutes] is an invalid option for [automation]. Check: automation->trigger->0->minutes. (See /home/homeassistant/.homeassistant/configuration.yaml, line 121). Please check the docs at https://home-assistant.io/components/automation/
    - default_config: ?
      script: ?

I’ve been reading the docs and checking other people’s example for a similar examples such as petros

So what am I doing wrong now

    platform: time
    minutes: '/120'
    seconds: 00

That’s been changed since from time to time_pattern.

Yep. See here, OP.

Sick! I got it working! Thanks so much.

Also one more question I also want to add a secondary condition so that it only does the action if the light is currently on. Point me in the right direction por favor?

Thanks! (also I’m a Jakobs man myself)

You can just drop another condition under the existing one that tests if the light is on. Conditions are AND by default.

You should also adjust your spacing on the condition. Move after, before, and condition one space to the left.

Also, I won’t judge your gun choice :wink:

that won’t work, as said in the post you linked. the mod func will not work on 120 for minutes. You’ll have to make it

hours: '/2'

EDIT: I’m replying to wrong person. Should be @kuro8989

Just to explain 120 % 60 returns zero. So, in essence this will trigger every 60 minutes, not every 120, which is why you need to use hours.

Alright so I’m still erroring out, this is my first time doing a condition for state of the light so I’m not sure what I"m doing wrong. So here’s the example I’m pulling from

condition:
  - condition: state
    entity_id: 'device_tracker.paulus'
    state: 'home'
  - condition: numeric_state
    entity_id: 'sensor.temperature'
    below: 20

Now I moved my code around to better match it.

- id: 'cc_worknorth'
  alias: cc work north
  trigger:
    platform: time_pattern
    minutes: '/120'
    seconds: 00
  condition: 
    - condition: time
      after: '10:30:00'
      before: '03:00:00'
    - condition: state
      entity_id: light.2f_lc_work_area_north
      state: off
  action:
  - service: light.turn_on
    entity_id: light.2f_lc_work_area_north
    data_template:
      hs_color:
        - "{{ range(360)|random }}"
        - "{{ range(80,101)|random }}"
      brightness_pct: 100

Thanks for all the help btw this community has been invaluable.

I’m not sure if you’re purposly ignoring but this time pattern will not fire every 120 minutes.

You need to change it to

    platform: time_pattern
    hours: '/2'
    seconds: 00

As I said before, time pattern /120 minutes will fire EVERY 60 MINUTES.

You are correct, thanks for catching that. I just did a quick change of OP’s code from time to time_pattern as an example.

Oh, I’m actually aiming for every hour time change actually. So the code I have down is working fine.

Thanks!