Triggering on two anded states

two sections of my automations.yaml the first section works , the second doesn’y but the error checking points at configuration.yaml

###  turn off LR lamp if wall lights are tuned on
 - alias: Turn off LR lampif WL on
   trigger:
     platform: state
     entity_id: device_tracker.esp_552f65_lan, device_tracker.esp_55fd74_lan
     to: 'home'
   action:
     service: switch.turn_off
     entity_id: switch.living_room_lamp
##the above section works ok     
#########  Section to turn off shack power if Both Richard and Sue are out
 - alias: shack power if out
   trigger:
     platform: state
   condition:
     condition: and
     conditions:
     - condition: state
       entity_id: device_tracker.android_7ad792e3b1647c4f_lan
       state: "away"
     - condition: state
       entity_id: device_tracker.android_ab0cc2d3ebea9fac_lan
       state: "away"
   action:
     service: switch.turn_off 
     entity_id: switch.shack_power               

the error checking points at

group: !include groups.yaml

thats confusing me
My question is in the first section the entity_id 's are listed coma separated , is that an AND or an OR listing

Also is a “;” accepted the same as a “#” as a comment
thanks

From the docs

Unlike a trigger, which is always or , conditions are and by default - all conditions have to be true.

You’re missing the state entity_id in the second trigger.

Thanks, I’ll keep trying, I read from your answer that comma separated entities are OR

No, what he is saying is that triggers are ALWAYS “or”. Conditions are ALWAYS “and” unless specified otherwise.

And, most importantly, he is saying that your trigger is incomplete. You MUST AT LEAST use an “entity_id:” entry in addition to the “platform:” entry in the trigger.

so something like this:

trigger:
  platform: state
  entity_id: domain.entity_name

again, that is the MINIMUM requirements. there are other options. Have you read the docs on automating HA?

Yes Finity I HAVE RTFM’d , they are not clear when it comes to conditional triggering.
Just because I get things wrong does NOT mean I haven’t read through the doc , example, cookbook and most of the posts…
The previous answer was vague, very vague

no reason to get testy. I was just clarifying something you misunderstood and asked if you had read the documentation. I didn’t want to assume you had and if you hadn’t it was a nudge in that direction.

there is no such thing.

there are “triggers” and there are “conditions”.

you need to separate those concepts out from each other in your mind. they are two completely different concepts.

And I will edit to add:

that is one reason why I really dislike using a comma separated list like that in an automation. It just confuses things more than it’s worth.

OK fair enough,
while yer online
are interval times ie scan_interval and home_interval in seconds or is there a mix of seconds and minutes.
trying to determine why its taking so long for the phones when disconnected from the wifi to show on HA as away
I’m checking for 4 ipaddresses in the same subnet
two show a changed state in about 10 sec, smart bulbs
the two phones take much longer
I have “home_interval: 10” which I thought was seconds
tnx

I’m not sure that “home_interval” is valid. You might be thinking of “consider_home” which I’m pretty sure is in minutes. And “scan_interval” is in seconds.

Which device tracker component are you using?

I’m using nmap

device_tracker:
  - platform: nmap_tracker
    hosts:
      - 192.168.1.94  #LR wall light
      - 192.168.1.95  #LR wall light
      - 192.168.1.69  #Richard's phone
      - 192.168.1.75  #Sue's phone
    home_interval: 10

I found the "home_interval " somewhere in the docs/examples
I did’t want to use an exclude list as there are now 12 devices on the lan at the moment
with another 3 excluding those in the list that are used.

Also any idea why lovelace shows version 91.2 when 92.1 is running , server and UI both have been restarted., thats not important, as its not causing any problems

However, if I trigger on time_pattern on a 1 minute interval it works , so I’ll leave it on that triggering.

looked at the docs for nmap and home_interval is in minutes

thanks Finity