I’m working on creating a blueprint to tell whether or not an entity (Switch or Light) was turned on/off by physical touch or HA. I know it works because I copied it directly from an automation that actively works. However, any attempt to save it to a file and import it into Home Assistant I get errors like these:
Invalid blueprint: extra keys not allowed @ data['blueprint']['action']. Got [{'choose': [{'conditions': [{'condition': 'template', 'value_template': '{{ trigger.to_state.context.id != none }}'}, {'condition': 'template', 'value_template': '{{ trigger.to_state.context.parent_id == none }}'}, {'condition': 'template', 'value_template': '{{ trigger.to_state.context.user_id == none }}'}], 'sequence': [{'service': 'input_boolean.turn_on', 'target': {'entity_id': Input(name='trigger_boolean')}}]}, {'conditions': [{'condition': 'template', 'value_template': '{{ trigger.to_s... extra keys not allowed @ data['blueprint']['condition']. Got [{'condition': 'template', 'value_template': "{% if states(trigger.entity_id) != 'unknown' and not is_state(trigger.entity_id, 'unavailable') -%}\n true\n{%- endif %} \n"}] extra keys not allowed @ data['blueprint']['trigger']. Got {'platform': 'state', 'entity_id': [Input(name='trigger_entity')]}
Any suggestions or experts to look at this and fix my typo or error somewhere?
blueprint:
name: Monitor Entity State Changes
description: Monitor state changes of multiple entities and determine the type of change.
domain: automation
input:
trigger_entity:
name: Entities to Monitor
description: List of entity IDs to monitor state changes.
selector:
entity:
trigger_boolean:
name: Corresponding Input Booleans
description: List of input_boolean entities to set based on state changes.
selector:
boolean:
trigger:
platform: state
entity_id:
- !input trigger_entity
condition:
- condition: template
value_template: >
{% if states(trigger.entity_id) != 'unknown' and not
is_state(trigger.entity_id, 'unavailable') -%}
true
{%- endif %}
action:
- choose:
- conditions:
- condition: template
value_template: "{{ trigger.to_state.context.id != none }}"
- condition: template
value_template: "{{ trigger.to_state.context.parent_id == none }}"
- condition: template
value_template: "{{ trigger.to_state.context.user_id == none }}"
sequence:
- service: input_boolean.turn_on
target:
entity_id: !input trigger_boolean
- conditions:
- condition: template
value_template: "{{ trigger.to_state.context.id != none }}"
- condition: template
value_template: "{{ trigger.to_state.context.parent_id == none }}"
- condition: template
value_template: "{{ trigger.to_state.context.user_id != none }}"
sequence:
- service: input_boolean.turn_off
target:
entity_id: !input trigger_boolean
- conditions:
- condition: template
value_template: "{{ trigger.to_state.context.id != none }}"
- condition: template
value_template: "{{ trigger.to_state.context.parent_id != none }}"
- condition: template
value_template: "{{ trigger.to_state.context.user_id == none }}"
sequence:
- service: input_boolean.turn_off
target:
entity_id: !input trigger_boolean