Trigger state with 'Or'

I’ve noticed this morning that all the iPhones in my house are now reporting battery_state ‘Full’ when on charge and at 100%. Before today, they would just continue to show ‘Charging’ even when at 100% so not sure if that is due to some update.

This may make a difference to some of my triggers and my question is, can an ‘OR’ be placed in the trigger section of an automation?

So in my trigger below, I would want it to look for
from: Charging OR from: Full
to: Not Charging

This is my current automation:

  trigger:
  - platform: state
    entity_id: sensor.iphone_battery_state
    from: Not Charging
    to: Charging
  trigger:
  - platform: state
    entity_id: sensor.iphone_battery_state
    to: Not Charging
    from: 
      - Charging
      - Full
1 Like

That simple?

Thank you, Drew, I’ll give it a go shortly.

Documentation reference: State Trigger

The documentation explains to and from (and not_to and not_from) accept multiple values and provides examples. If you believe the documentation inadequately explains the concept, please suggest how it can be improved.