Light group status in automation

Ugh.
But it’s not consistent then.
Why would my roomba automation not force trigger now? The only thing preventing it is the condition…

Edit: gotcha. The condition is in the action for that one.

Let me rephrase that…conditions are ignored in the body of the automation (not sure how else to say that) but if they are a part of a script as your roomba one is it is still evaluated. I agree it’s inconsistent…

Yep, I get the difference now.
Sheesh, this was harder than expected :slight_smile: Thank you both for your help!

Both of these states are not quoted.
You could also try adding a “from” state:

  from: 'not_home'
  to: 'home'

That way it will false trigger a lot less in my experience.

This condition is wrong. The time condition is only 1 condition so there will not be made us of the OR-statement. If you would like it to trigger on the time or on the day, use like this:

action:
      - condition: or
        conditions:
          - condition: time
            # At least one of the following is required.
            after: '08:00:00'
            before: '16:00:00'
         - condition: time
            weekday:
                - tue
                - thu
                - sat

P.S. now I see that the order is also wrong. this is how it should be:

  - alias: RoombaTueThuSat
    hide_entity: False
    trigger:
      platform: state
      entity_id: group.all_devices
      to: not_home
    condition:
      condition: or
      conditions:
        - condition: time
          after: '08:00:00'
          before: '16:00:00'
       - condition: time
          weekday:
              - tue
              - thu
              - sat
    action:
      - service: script.turn_on
        entity_id: script.run_roomba
      - service: notify.jarvismike
        data:
          message: 'Roomba started'

I had noticed, see my post above

I already acknowledged the “single condition or”. It works anyway. One day I’ll clean up that mess. But it does the job for now. As for the order (the condition being in the action script), it’s not “wrong” per se, as it works. It just behaves differently when triggering the automation manually, as we figured out above :slight_smile:

As for missing quotes, missing “from” in the trigger, etc… it works without. But I agree that it would be more robust.