As a newbee I’m fashinated and lured by the blueprint concept asit would allow me to work with templates for my home automation rather then copy-paste…
But, albeit I have triedto follow the template blueprints bundled with 2020.12, the online documentation as well as Barret’s video, I still fail with even the simplest attempt, resulting in
- the automation not being visible in the UI, although created in the automation.yaml
- the server log throwing an error that makes me non the wiser:
Blueprint Mall - slack dumma lamport generated invalid automation with inputs OrderedDict([(‘turn_off_time’, ‘22:00:00’), (‘target_light’, ‘switch.matrum_glas_musik’)]): expected a dictionary for dictionary value @ data[‘action’][0][‘target’]. Got None
Random attempts has created entries in the automation UI, but with the entity field being unpopulated.
Blueprint:
blueprint:
name: Mall - slack dumma lamport
description: Slack vid ngt klockslag
domain: automation
input:
turn_off_time:
name: Tid
selector:
time:
target_light:
name: Lampa
selector:
entity:
domain: switch
mode: single
trigger:
platform: time
at: !input turn_off_time
action:
service: switch.turn_off
target: !input target_light
automation.yaml:
- id: '1608379702611'
alias: abc 201219 1308
description: ''
use_blueprint:
path: homeassistant/mall_slack_dum_lampa_kvall.yaml
input:
turn_off_time: '22:00:00'
target_light: switch.matrum_glas_musik
Things like the usage of preceding “-” in the action part does not make life easier for use newbies, in the two examples attached in 202.12, one of them is written with, while the other is without. Is it significant? No idea. What I do is that I take an existing working automation and try to apply the blueprint requirement on top. Does it work? no.
leaving zone blueprint example:
action:
domain: mobile_app
type: notify
device_id: !input notify_device
message: "{{ person_name }} has left {{ zone_state }}"
motion light example:
action:
- service: light.turn_on
target: !input light_target
- wait_for_trigger:
platform: state
entity_id: !input motion_entity
from: "on"
to: "off"
- delay: !input no_motion_wait
- service: light.turn_off
target: !input light_target