Hey all,
Slowly I am getting the hang of templating and automations. I do have a interesting item though. I programmed the following code. Well, I made it smaller to make sure that I could find the issue.
Anyway I’m getting the following feedback from the debug log:
Error: dictionary update sequence element #0 has length 1; 2 is required
But why? Where? How?
- id: beweging_gang
alias: Beweging gang
description: ''
trigger:
platform: state
entity_id:
- binary_sensor.motion_sensor_gang_1_home_security_motion_detection
- binary_sensor.motion_sensor_gang_2_home_security_motion_detection
to: 'on'
action:
service: scene.turn_on
target: >
{%- if is_state('input_boolean.night_switch', 'on') -%}
entity_id: scene.gang_nachtlampje
{%- elif is_state('input_boolean.night_switch', 'off') -%}
entity_id: scene.gang_helder
{%- else -%}
entity_id: scene.gang_helder
{% endif %}