core: shorthand condition in action block not valid?

The problem

seems the new shorthand conditions are not accepted in the config checker

What version of Home Assistant Core has the issue?

2022.5.0.dev20220427

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

automation

Link to integration documentation on our website

https://www.home-assistant.io/docs/automation/

Diagnostics information

No response

Example YAML snippet

- alias: Timer switch
    id: timer_switch
    trigger:
      platform: state
      entity_id: input_boolean.test
    action:
      - not:
          - condition: state
            entity: input_boolean.test_2
            state: 'on'

Anything in the logs that might be useful for us?

Logger: homeassistant.config
Source: config.py:454 
First occurred: 23:07:10 (1 occurrences) 
Last logged: 23:07:10

Invalid config for [automation]: Unable to determine action @ data['action'][0]. Got None. (See ?, line ?).

Additional information

tbh, I am not sure of the correct syntax,(do we need the leading ‘condition’ or not) but any regular condition I tested in the condition block was refused in an action block

config check passes with a valid config…

Schermafbeelding 2022-04-27 om 23 11 41

though the logs shows other wise

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 21 (19 by maintainers)

Most upvoted comments

just to confirm. thanks a lot!

Made a PR to add it to consider it: https://github.com/home-assistant/core/pull/71022

I don’t think anyone changed anything yet…