Invalid config when using not condition (short hand) with new if-then in scripts

Trying to incorporate the new if-then syntax with the new short form for not conditions and I get this Invalid config message:

Logger: homeassistant.config
Source: config.py:454
First occurred: 10:03:31 AM (1 occurrences)
Last logged: 10:03:31 AM

Invalid config for [script]: Unexpected value for condition: 'OrderedDict([('not', [OrderedDict([('condition', 'state'), ('entity_id', 'person.person1'), ('state', 'home')]), OrderedDict([('condition', 'state'), ('entity_id', 'sensor.person1_iphone_11_battery_state'), ('state', 'Charging')]), OrderedDict([('condition', 'numeric_state'), ('entity_id', 'sensor.person1_iphone_11_battery_level'), ('above', 10)])])])'. Expected and, device, not, numeric_state, or, state, sun, template, time, trigger, zone @ data['sequence'][1]['if'][0]. Got None. (See ?, line ?).

Here’s the script:

        - if:
            - condition:
                not:
                  - condition: state
                    entity_id: person.person1
                    state: home
                  - condition: state
                    entity_id: sensor.person1_iphone_11_battery_state
                    state: 'Charging'
                  - condition: numeric_state
                    entity_id: sensor.person1_iphone_11_battery_level
                    above: 10
          then:
            - service: notify.TEXT_PERSON1
              data:
                message: "Your Phone is Low.  STOP RECORDING STUFF and Turn It Off, Till you are ready to Come HOME"

Remove the first line

- condition

    sequence:
      - if:
          not:
            - condition: state

1 Like

Awesome, thanks.
Works great.
It’s always the simple little stuff that gets ya!