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

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

Hey folks, I had the same problem: I have not seen automations created via the UI or blueprint.

I use separate merged files for automations and I have tried to create automation via blueprint which did not appear in the UI. So I modified the configuration.yaml like this:

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

This didnā€™t help either, so I deleted the automatically created automations.yaml file and created it manually via explorer.

Now all automations created via UI or blueprint are listed in UI and works like a charm! There was really a permission issue when HA created the automations.yaml file.

For those who tried including an automations merged list folder AND the UI-created automations.yaml file, I tried that in 2021.3.4 and it did not work for me. So, I ended-up leaving only the dir_merge_list command on my configuration.yaml, and creating a symbolic link in my automations folder to include the automations.yaml file the GUI is maintaining in the directory.

If you want to do the same, you need to SSH into the HA container (run the SSH extension for that) and execute the following commands (assuming your automations folder is caller, well, automations)

cd /root/config/automations
ln -s ../automations.yaml gui_automations.yaml

With that and a reloading of automations, my blueprint- and GUI-created automations started showing-up in the UI as expected.

I have had the same problem, but I am using the following in my configuration.yaml:

packages: !include_dir_named packages

I tried just copying the gui-built automations from automations.yaml into another file in my packages folder, but they still werenā€™t picked up. Iā€™m not sure why. Is there anything saying that I canā€™t have an automation in the form:

  - alias: automation_alias
    id: 72416ea2490942d398bf56b79075396b
    description: This is the description of the automation
    use_blueprint:
      path: homeassistant/blueprint.yaml
      input:
        sensor: sensor.my_sensor
        target: input_number.target_input_number

Is the path to the blueprint YAML file relative? That is to say, given that I have moved the automation to a different file, do I have to update the blueprint YAML fileā€™s path?

I donā€™t think that matters, since the includes have the effect of bringing content from other files into your main configuration.yaml file, so any relative paths you specify are to be resolved from the location of configuration.yaml.

If you see what Iā€™ve done above, by creating the symlink under the config/automations folder, the GUI-created automations are now being loaded from a a subfolder under config, yet they are working just fine, blueprints and all

Thatā€™s the problem I never had an automations folder, I had a packages folder:

I canā€™t just link the automations.yaml file under my packages folder, because it would require an automation: heading.

This ended up being a false alarm for me. I had a syntax error in my blueprint, but nothing was showing up when I clicked ā€œCheck Configurationā€ ā€“ not on that page, nor that notification that tells me to check the logs ā€“ but there was ultimately something in the logs that led me to the problem.

1 Like

probably a permissions issue. Fixed by the symbolic link from your automations folder using the right permissions.

Hmm. Having the same issue. Itā€™s loading other things from automations.yaml. As well as community blueprints. Just not my own. Maybe someone can spot something in my blueprint thatā€™s causing it not to load. And yes, itā€™s currently set to seconds of randomization for testing purposes. Thanks to anyone that can help.

blueprint:
  name: Vacation Light
  description: Automate light with variable timing. Randomized by delaying up to 30 minutes.
  domain: automation
  input:
    target_light:
      name: light
      description: the light you want to automate
      selector:
        target:
          entity:
            domain: light
    time_on:
      name: time on
      description: when you want the light to turn on
      selector:
        time:
    time_off:
      name: time off
      description: when you want the light to turn off
      selector:
        time:
    brightness:
      name: Brightness
      description: Light brightness
      selector:
        number:
          min: 0
          max: 255
trigger:
- platform: time
  at: '!input time_on'
condition:
- condition: state
  entity_id: input_boolean.vacation
  state: 'on'
action:
- delay: '{{ range(0, 31)|random|multiply(1) }}'
- service: light.turn_on
  target:
    entity_id: !input target_light
  data:
    brightness: !input brightness
- wait_for_trigger:
  - platform: time
    at: '!input time_off'
- delay: '{{ range(0, 31)|random|multiply(1) }}'
- service: light.turn_off
  target:
    entity_id: !input target_light
mode: single
target: !input target_light

Try this. It helped me.

Unfortunately that fails the blueprint validation and it wonā€™t show up in blueprints. Tried it anyways though with the existing automation entries, but it didnā€™t change :frowning: Appreciate the suggestion of something to try though.

tested some more. this works with me:

blueprint:
  name: TEST
  description: Automate light with variable timing. Randomized by delaying up to 30 minutes.
  domain: automation
  input:
    target_light:
      name: light
      description: the light you want to automate
      selector:
        target:
          entity:
            domain: light
    time_on:
      name: time on
      description: when you want the light to turn on
      selector:
        time:
    time_off:
      name: time off
      description: when you want the light to turn off
      selector:
        time:
    brightness:
      name: Brightness
      description: Light brightness
      selector:
        number:
          min: 0
          max: 255
trigger:
  - platform: time
    at: !input time_on
condition:
  - condition: state
    entity_id: input_boolean.vacation
    state: "on"
action:
  - delay: "{{ range(0, 31)|random|multiply(1) }}"
  - service: light.turn_on
    target: !input target_light
    data:
      brightness: !input brightness
  - wait_for_trigger:
      - platform: time
        at: !input time_off
  - delay: "{{ range(0, 31)|random|multiply(1) }}"
  - service: light.turn_off
    target: !input target_light
mode: single

Thank you! Looks like I made some formatting/quoting mistakes that led to my mess. Works great now and really appreciate your help.

1 Like

I have gone through the suggestions in this thread, but am still not able to figure out how to make Blueprints work.

I created the following blueprint:

blueprint:
  name: Lava Lamp Timer
  description: Lava Lamps don't like to be left on continuously.  This blueprint turns them off after a specified time.
  domain: automation
  input:
    target_light:
      name: Lava Lamps
      description: Lava Lamps to manage
      selector:
        target:
          entity:
            domain: light


trigger:
- platform: state
  entity_id: !input target_light
  to: 'on'
  for: '10:00:00'

action:
- service: light.turn_off
  entity_id: !input target_light

I reloaded automations: Developer Tools ā†’ Services Automation:Relaod

I created the automation from the blueprint.

I reload automations again just in caseā€¦

I donā€™t see the resulting automation in the GUI, but I do see it in automations.yaml

- id: '1630613538395'
  alias: Lava Lamp Timer
  description: ''
  use_blueprint:
    path: lava_lamps.yaml
    input:
      target_light:
        entity_id: light.lava_lamps

If I try to use one of built in blueprints, the resulting automation does appear in the GUI, so HA is doing something I am not.

Permissions on my blueprint are the same as the built in blueprints

My configuration.yaml looks like this:

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

This is a new install, less than 10 days old. My previous sd card shat the bed, and foolish me, I hadnā€™t back it up. Thought I would try out blueprints this time.

I donā€™t understand what is wrong with my blueprint, and HA doesnā€™t seem to be logging the issue in a place I can find, so that makes this even more difficult to understand.

Thanks for you help in advance.

Bill