Combined Time/Sun trigger

a very common trigger requirement is something like “Open blinds ant sunrise but not before 7 o’clock”. Decribing this trigger is quite complex with the current syntax:

  • create one trigger at 7:00 that has “and sun is up” condition
  • create another trigger at sunrise that has “after 7:00” condition
  • dupplicate the automation

I think we should have a an easier way to express this. I can imagine the following options:

  • add an alternative time trigger to the sun trigger
  • create new trigger like “first of” and “last of” that takes several timer triggers and executes on the first/last occuring one.

I don’t see the issue, one simple automation like this should do:

- alias: "Blinds up at sunrise but not before 07:00"
    - platform: sun
      event: sunrise
    - platform: time
      at: "07:00:00"
    - condition: sun
      after: sunrise
    - condition: time
      after: "07:00:00"
    - service: cover.open_cover
      entity_id: cover.your_cover

Spot on. No need for two automations.

Looks like I did not see the obvious ^^
Thank you for pointing it out!

For others who might find this thread, this is my final result:

  - alias: 'Jalousien früh öffnen'
    trigger: # trigger on 7:30, 8:30 and sunrise
      - platform: time
        at: '07:30'
      - platform: time
        at: '08:30'
      - platform: sun
        event: sunrise
        offset: "+00:30:00"
    condition: # condition: sum must be rised and it's not too early in the morning
      - condition: sun
        after: sunrise
        after_offset: "+00:30:00"
      - condition: or
        - condition: time
          - mon
          - tue
          - wed
          - thu
          - fri
          after: "07:30:00"
        - condition: time
          after: "08:30:00"
      - service: cover.open_cover
          entity_id: cover.jalousie_flur
1 Like