I am writing my first blueprint by converting a working automation. I am stuck at the first, basic step where I just wanted a functional blueprint with one input to test it in the UI.
To go from an automation to the blueprint I did this:
The complete blueprint is
blueprint:
name: Smart Switch
description: A genric switch with reactions on various clicks
domain: automation
input:
switch_entity:
name: switch to configure
selector:
target:
entity:
filter:
- domain: switch
alias: WHERE ⬤ WHAT switch
description: ""
trigger:
- target: !input switch_entity
domain: zha
platform: device
type: remote_button_short_press
subtype: button_1
enabled: true
id: first button pressed
- device_id: d33252aa89360e7771d798db830b0f8a
domain: zha
platform: device
type: remote_button_short_press
subtype: button_2
id: second button pressed
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- first button pressed
sequence:
- service: light.toggle
metadata: {}
data: {}
target:
entity_id: light.parents_armoires
alias: armoires
- conditions:
- condition: trigger
id:
- second button pressed
sequence:
- service: light.toggle
metadata: {}
data: {}
target:
entity_id: light.parents_lit
alias: lit
mode: single
When looking at this blueprint in Settings → Automations and Scenes → Blueprints
, it shows the error
Invalid blueprint: extra keys not allowed @ data['blueprint']['input']['switch_entity']['selector']['entity'][0]['filter']. Got None
I am a bit puzzled here because
- it closely follows the documentation for blueprints and selectors
- it would suggest that a list in expected below
entity
, which does not match the documentation.
I think this is a basic misunderstanding from my side that is the cause of the problem - I would appreciate a pointer to the right direction (and i will learn on the way from there as I want to expand and make my blueprint flexible to be used as a template for all my switches (wall and “button” ones)
I looked at previous similar questions but
- Blueprint error - extra keys not allowed - #2 by hallettj → indentation error
- Keep getting parsing errors on my blueprint: extra keys not allowed - #11 by networkingcat → missing targets
- What am I doing wrong: Invalid data for call_service at pos 1: extra keys not allowed @ data['brightness_pct'] → related to a script (and no solution)
- Help Blueprints are driving me mad! - extra keys not allowed [in condition] Got None required key not provided [entity id]. Got None - #4 by Ankhwatcher → not relevant I think
- @123 is being quoted twice, but I do no think this is my problem either