Repeated automation

Hi All,

I have an automation that fires every 5min when the sun is up(± offset)
and one for during the night(copy paste from the previous one and i switch the sun rise and sunset)

the first one works perfectly the second one doesn’t fire at all.

anyone can help my find the mistake?

thanks!

  - alias: Reiger fontein automatisering overdag
  trigger:
platform: time
minutes: /5
seconds: 0
  condition:
condition: and
conditions:
- condition: sun
  after: sunrise
  after_offset: "-01:00:00"
- condition: sun
  before: sunset
  before_offset: "+01:00:00"
  action:
  - service: switch.turn_on
entity_id: switch.Reiger_pomp
  - delay:
  seconds: 4
  - service: switch.turn_off
entity_id: switch.Reiger_pomp

- alias: Reiger fontein automatisering nacht
  trigger:
platform: time
minutes: /30
seconds: 0
  condition:
condition: or
conditions:
- condition: sun
  before: sunrise
 #     after_offset: "+01:10:00"
- condition: sun
  after: sunset
 #     before_offset: "-01:10:00"
  action:
  - service: switch.turn_on
entity_id: switch.Reiger_pomp
  - delay:
  seconds: 4
  - service: switch.turn_off
entity_id: switch.Reiger_pomp

Without the proper indentation it’s pretty impossible to debug, you also have entity_id’s with a capital letter which probably doesn’t help - you also have an or condition in the second one, shouldn’t it be an and?

- alias: Reiger fontein automatisering overdag
  trigger:
    platform: time
    minutes: /5
    seconds: 0
  condition:
    condition: and
    conditions:
    - condition: sun
      after: sunrise
      after_offset: "-01:00:00"
    - condition: sun
      before: sunset
      before_offset: "+01:00:00"
  action:
  - service: switch.turn_on
    entity_id: switch.Reiger_pomp
  - delay:
      seconds: 4
  - service: switch.turn_off
    entity_id: switch.Reiger_pomp
    
- alias: Reiger fontein automatisering nacht
  trigger:
    platform: time
    minutes: /30
    seconds: 0
  condition:
    condition: or
    conditions:
    - condition: sun
      before: sunrise
 #     after_offset: "+01:10:00"
    - condition: sun
      after: sunset
 #     before_offset: "-01:10:00"
  action:
  - service: switch.turn_on
    entity_id: switch.Reiger_pomp
  - delay:
      seconds: 4
  - service: switch.turn_off
    entity_id: switch.Reiger_pomp

I will retry the and/or condition but as if i remember correctly it had little effect.
since my automation works in the first one, also with capitals, i did not think this would make a difference.
i will change them and try the automation again.

thx for the tips