"Automation is unavailable" when creating or updating automation

When I create or update my automation I briefly get an alert “Automation is unavailable” with no additional info. The automation itself is saved but never triggers. If I run it manually and check the Traces it looks like it is bypassing Conditions going directly to Actions.

Can’t find any entries in HA Core logs, where else and what else can I check?

My automation in YAML:

alias: Bedroom-AC-off
description: ""
trigger:
  - platform: numeric_state
    entity_id: sensor.a4c1382d4915_temperature
    above: 23
    attribute: native_value
condition:
  - condition: and
    conditions:
      - condition: device
        device_id: 89c06ded8358205fd40c164c744c4caf
        domain: climate
        entity_id: 4a21111c420f3c905b098ce65b2c8098
        type: is_hvac_mode
        hvac_mode: heat
      - condition: numeric_state
        entity_id: climate.airconditioner
        attribute: temperature
        above: 21
action:
  - service: climate.set_temperature
    data:
      temperature: 21
    target:
      entity_id: climate.airconditioner
mode: single

Another weird hex entity_id in your first condition. These keep popping up around the forum causing problems. Try using a state condition instead:

      - condition: state
        entity_id: climate.airconditioner
        state: "heat"

You also don’t need the condition: and as conditions are AND by default.

This is what running manually is supposed to do - It only tests the actions. If you want to test triggers or conditions, you can change the values of the relevant entities in Developer Tools.

Let me disagree: running manually bypasses the Triggers, but still passes all the route with conditions. This is what my experience with other Automations confirms.

Thank you very much! Seems that was the reason - now it does not alert me with “Automation is unavailable”! Strange, as this YAML was automagically generated by HA GUI itself )

Good point This was expected behaviour how it should work, but I was unsure and tried both ways.

BTW, is there any way to build IF / ELSE constructs with HA GUI or YAML?

Yes. Start here:

Many different ways to do it depending on what you’re trying to do.