Set tricker each 15 minutes between 12 and 3 hours before sunsetk

Hi,
will below tricker work to see if the conditions I set are met? I want to lookup the conditions every 15 minutes between a certain time frame. In this case between 14:00 hour and 3 hours before sunset.

triggers:
  - trigger: time
    at: input_datetime.tussen_14_uur_en_3_uur_voor_sunset
  - trigger: time_pattern
    minutes: /15

That will trigger every 15 minutes. Enabling you to filter the actions to a set time period using time and sunset conditions.

Thanks for the reply. So it will trigger every 15 minutes between the timeframe of 14:00 to x? Please confirm: yes or no? If not, how to make it work?

15 minutes on the hour so 14:15, 14:30, 14:45 etc…

Have you defined the conditional time frame?

No it will trigger every 15 minutes 24 hours a day.

You need to add conditions to limit it:

conditions:
  - condition: time
    after: "14:00"
  - condition: sun
    before: sunset
    before_offset: "-03:00:00"
1 Like

no, I did not set the timeframe in the condition. Is it not possible to ad 2 trickers that are AND? Are trickers always OR?

like this?

alias: If conditions match summer
condition: and
conditions:
  - condition: numeric_state
    entity_id: sensor.energy_next_hour
    above: 1
  - condition: numeric_state
    entity_id: sensor.p1_meter_vermogen
    below: -1.5
  - condition: state
    entity_id: sensor.season
    state: Summer
  - condition: time
    after: "14:00"
  - condition: sun
    before: sunset
    before_offset: "-03:00:00"

Almost.

Conditions are AND by default. So just this will do:

conditions:
  - condition: numeric_state
    entity_id: sensor.energy_next_hour
    above: 1
  - condition: numeric_state
    entity_id: sensor.p1_meter_vermogen
    below: -1.5
  - condition: state
    entity_id: sensor.season
    state: Summer
  - condition: time
    after: "14:00"
  - condition: sun
    before: sunset
    before_offset: "-03:00:00"

Thanks, and trickers can not be AND?

Triggers are OR logic. Any one of them can trigger the automation.

If you want AND logic triggers you have to duplicate them in the conditions.

e.g.

triggers:
 - trigger: state
   entity_id: binary_sesnor.foo
   to: "on"
 - trigger: state
   entity_id: binary_sesnor.bar
   to: "on"
conditions:
  - condition: state
    entity_id: binary_sensor.foo
    state: "on"
  - condition: state
    entity_id: binary_sensor.bar
    state: "on"

No triggers are always OR, use a condition for the second trigger.

Thanks, so what exactly does this tricker do?
does it tricker ones in that time frame? in this case 1 time at 14:00? So why is this bandwide in time then available of there is no AND tricker status?

trigger: time
at: input_datetime.tussen_14_uur_en_3_uur_voor_sunset

It triggers whenever the current time matches the time (and date if specified) value in the input_datetime.

Not really sure what you are saying here: