Automation created using a blueprint not showing up in UI after creating

Same issue here, HA 2020.12.0 (via docker). I can create an automation from a blueprint, I see it in get added to automations.yaml, but nothing is visible in the Automations UI. I just upgraded to 2020.12.1, and during startup I see the exception below. It looks like for one item in the blueprint, I hit “Add Action” and then removed the action, but it was stored with empty values in automations.yaml:

      flipped_face_1:
      - device_id: ''
        domain: ''
        entity_id: ''

This causes automations to be unhappy (below exception). Once I removed the blank bits, it shows up in Automations as expected. This might be a different issue than what @appels is seeing though, because I don’t see any invalid/empty fields in the blueprint automation.

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py", line 81, in async_get_device_automation_platform
    integration = await async_get_integration_with_requirements(hass, domain)
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 47, in async_get_integration_with_requirements
    integration = await async_get_integration(hass, domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 491, in async_get_integration
    raise IntegrationNotFound(domain)
homeassistant.loader.IntegrationNotFound: Integration '' not found.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 213, in _async_setup_component
    result = await task
  File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 169, in async_setup
    if not await _async_process_config(hass, config, component):
  File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 512, in _async_process_config
    await async_validate_config_item(
  File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 74, in async_validate_config_item
    config
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 143, in async_validate_actions_config
    return await asyncio.gather(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 187, in async_validate_action_config
    choose_conf
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 143, in async_validate_actions_config
    return await asyncio.gather(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 158, in async_validate_action_config
    platform = await device_automation.async_get_device_automation_platform(
  File "/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py", line 84, in async_get_device_automation_platform
    raise InvalidDeviceAutomationConfig(
homeassistant.components.device_automation.exceptions.InvalidDeviceAutomationConfig: Integration '' not found

Update on this issue:
So today I upgraded my live setup on the intel NUC and I tested my simple blueprint on there and it’s working. The created automation shows up in the UI and it works.

Hi there!

I was facing the same issue with my Home Assistant Docker container running the latest version. I noticed that untouched files containing blueprints remained visible in the automation list while blueprints that I edited, weren’t listed…

That made me realise it most likely had to do something with permissions. Turns out; that’s the case! A file containing a blueprint should only have read access. This can be accomplished by copying the permissions of one untouched file with the following command.

sudo chmod --reference=notify_leaving_zone.yaml sunset_light.yaml

Hope this helps someone. It at least was a huge relief to me that they worked again.

Kind regards,

Jochem

1 Like

this is a bug or it must be documented. i have the same issue

Hello,

Same issue for me, impossible to use blueprint.
When they don’t appear in the AUTOMATION UI, the automations doesnt work at all.

The permissions of the files are ok for me.

I had this. Just troubleshooted, and realised the error.

Automations created from blueprints (or the GUI in general) are created in automations.yaml

Which is fine if you include that. But if you do what I had, it gets ignored. I had the following in configuration.yaml:

automation: !include_dir_merge_list automations/

Which will merge all the files in automations BUT IGNORE automations.yaml in the main directory!!

I now have:

automation mine: !include_dir_merge_list automations/
automation ui: !include automations.yaml

Which works. Suddenly I have 20 extra test automations I created!

5 Likes

Thanks @walaj

I have already splitt my configuration like this. But i will try again.
This in my configuration.yaml

packages: !include_dir_named packages/

and in the directory packages this : my automation.yaml with

automation: !include ../automations.yaml
automation split: !include_dir_merge_list ../automations 

If you create an automation using the GUI (guided, or blueprint) is it written to automations.yaml?

if yes, but they don’t show in the GUI, then its not being included correctly…

In my case, yes, if I create an automation using a blueprint, I can find the automation in automations.yaml afterwards. However, if I use anything beyond the default “motion light” blueprint, the automation isn’t shown afterwards in the UI.
Getting to the point where I’ll just stick with automations and hope for a solution down the road.

Yes it is :wink: I try just now to be sure.
Strange behavior. maybe test with another platform trigger in the blueprint

So how to make automation created from blueprints visible in UI? New automations are in the end of automation.yaml file but invisible in UI and in the list of automations. How can I use them?

if the automation doesn’t show in HA/config/automation/dashboard then almost certainly automations.yaml isn’t being loaded - only written to.

check this post first if you haven’t already - Automation created using a blueprint not showing up in UI after creating

automation: !include_dir_merge_list automations/

This rule in my config was my issue.
Since I removed that one and merged all automations into 1 file, it works fine.
I have mixed feelings about it since now it’s all stored in one file and I can’t sepperate anymore.
Used to have automations grouped in ‘rooms’ which I can’t do anymore.
I’m using a naming system now to get sort of the same in the UI but it’s not ideal.
Would be cool if we could have some sort of way to group automations in the UI in future releases.

1 Like

Change it to:

automation mine: !include_dir_merge_list automations/
automation ui: !include automations.yaml

the mine: will import the subdirectory, and the ui: will get the main automations.yaml file

2 Likes

I tried many variants from that thread:

  • all automations in one file (other automations are visible except ones that created from blueprints)
  • automation manual: !include_dir_merge_list automations/
    automation ui: !include automations.yaml  
    
    

same visibility. New automations, created from blueprints, appeared in automations.yaml but still not visible in UI.

  • automation ui: !include automations_ui.yaml - New automations, created from blueprints, appeared in automations.yaml (not in automations_ui.yaml) and still not visible.

I believe GUI created automations are always created in automations.yaml so you must include that for them to show in the GUI.

automation ui: !include automations.yaml

will work

automation ui: !include automations_ui.yaml

wont (or rather it will include what is in automations_ui.yaml but the GUI created ones are still in automations.yaml)

I did it (second example in my post):

automation ui: !include automations.yaml  

But still not visible. I don’t know what else can I do.

remove the “ui” part. you only need the “automation:”.

automation manual: !include_dir_merge_list automations/
automation: !include automations.yaml

Ah, sorry! Didn’t write in my list of variants that I tried. Same results :frowning:

automation manual: !include_dir_merge_list automations/
automation: !include automations.yaml

I solved the problem. Automation made from blueprint became visible in these conditions:

  • lines in configuration.yaml:
automation manual: !include_dir_merge_list automations/
automation: !include automations.yaml
  • blueprint must be without errors. File Editor add-on reports error "unknown tag !<!input> " in the blueprint. That’s why I was confused. So there must be “!input” when you define the configurable parts as inputs.

Thank you all for help!

1 Like