Automation multiple triggers

  - alias: landing light on if out
    trigger:
      #first trigger     
      - trigger:
        platform: time_pattern
        minutes: '/5'
      # second trigger
      - trigger:
        platform: numeric_state
        entity_id: sun.sun
        value_template: "{{ state_attr('sun.sun', 'elevation') }}"
        below: -5.0
    condition:

Trying to create a mutilple trigger using the template in the docs
everything after condition: works, yet if I use the config checker on automations.yaml
its points to an error in an already working section not related to the above
Originally I had, which worked, the time ie. after 1630 and before 2230
It would be nice to use after sunset, hence the use of negative elevation
should it be similar to condition statements
sorta

    trigger:
      trigger: and
      trigger:    
        - trigger: platform <whatever>

current version 0.103.6
Normally copy and paste from the docs is safe and works

Iā€™ve used this which works, but Iā€™d like to know why multiple triggers didnā€™t

  - alias: landing light on if out
    trigger:
      platform: time_pattern
      minutes: '/5'
    condition:
      condition: and
      conditions:    
        - condition: template
          value_template: "{{ is_state('device_tracker.android_ab0cc2d3ebea9fac_lan', 'not_home') and is_state('device_tracker.android_richardfone_lan', 'not_home') 
        - condition: time
#          after: '16:00:00'
          before: '22:44:00'
        - condition: state
          entity_id: sun.sun
          state: 'below_horizon'  
    action:
      service: switch.turn_on
      entity_id: switch.landing_light

Take a look here.

The error would likely have helped us help youā€¦

The link posted was the exact page I copied from .
the second coment from tinkerer doesnā€™t even make sense

I bet the next will be flames instead of help

Iā€™ll translate it for you.

Please post the error message.

The error message refered to a line 20 lines above the section being worked on.
Tottaly erroneous and not kept.
That section works !!!, and has nothing to do with the multiple triggers, infact a different entity

Is this one large automation file? Did something get copied and pasted incorrectly causing the error you are seeing?

Eliminating one thing at a time helps not only you but others trying to help you.

OK, weā€™ll try one more time, and then youā€™re on your own.

Please

Post

The

Error

Message.

1 Like

I repeat again for the ability of those that can not read
the error message was not kept as it was erroneous

hashing out the new section shows no errors anywhere on the file, which removes pasting errors.
Config errors are only valid if on a section ā€œin progressā€, not something which has been working for months and still is.

IF the original question is answered there is no need for an error messageto be postes which again was not valid

Automations.yaml is now 340 lines long, so not that long

OK, we can only help you if we know what is wrong.

You said when you put the double trigger in you get an error, but when you take it out the error goes away. That makes the error message relevant.

So, instead of arguing with, and being rude to, everyone who is trying to help you go back to your automation, put the double trigger in, run the check and post the error message.

We couldā€™ve fixed this by now if you had done this in the first place.

2 Likes

Richard, this is not a conspiracy, we have nothing to gain here.
Iā€™m only posting now given others (failed) attempts to gain (only possibly) vital information to help solve a problem (given the above weā€™re not particularly helping you, just trying to solve a mystery)
Please run the check, post the error and your code from the indicated section and from where you think the error actually lies.

2 Likes

Remove the extraneous trigger: statements from your trigger block like so:

   - alias: landing light on if out
     trigger:
      #first trigger     
      - platform: time_pattern
        minutes: '/5'
      # second trigger
      - platform: numeric_state
        entity_id: sun.sun
        value_template: "{{ state_attr('sun.sun', 'elevation') }}"
        below: -5.0
1 Like

Yippeejajyay!!

Tom, given what the OP wanted would not this be better with just a 5 minute trigger and an action service template turning the light on or off depending on sun elevation ?

Thatā€™s not the problem in this topic. :upside_down_face:

What he said ^^

@VDRainer, @tom_l

Sorry Iā€™m lost, what your saying is that we should just answer the question asked rather than what we know to be the problem to be solved ?

Where does it say that ?

Isnā€™t that obstructive ? Itā€™s certainly not teaching new methods or pointing out different ways to solve problems and help them help themselves for ā€˜next timeā€™

Given the previously unaccommodating responses by op, yes. He made it pretty clear what he wants and only wants.

1 Like

Understood