Hi everybody,
I am trying to create a blueprint, but keep getting this error Message malformed: template value should be a string for dictionary value @ data['action'][0]['then'][0]['data']
; I have tried re-formatting the action
part of my yaml file, but no matter what I do, the error persists. I have been restarting Home Assistant after each attempted fix, but nothing makes a difference…
This is how the blueprint currently looks:
blueprint:
name: 'Heizungen Zeitsteuerung'
description: ''
domain: automation
input:
heizung:
name: 'Heizung'
description: ''
selector:
entity:
domain: climate
fenster:
name: 'Fenster'
description: ''
selector:
entity:
domain: binary_sensor
device_class: window
zeit_00:
name: 'Zeit/00'
description: 'input_datetime.*'
selector:
entity:
domain: input_datetime
zeit_01:
name: 'Zeit/01'
description: 'input_datetime.*'
selector:
entity:
domain: input_datetime
zeit_02:
name: 'Zeit/02'
description: 'input_datetime.*'
selector:
entity:
domain: input_datetime
zeit_03:
name: 'Zeit/03'
description: 'input_datetime.*'
selector:
entity:
domain: input_datetime
zeit_04:
name: 'Zeit/04'
description: 'input_datetime.*'
selector:
entity:
domain: input_datetime
zeit_05:
name: 'Zeit/05'
description: 'input_datetime.*'
selector:
entity:
domain: input_datetime
temperatur_00:
name: 'Temperatur/00'
description: 'input_datetime.*'
selector:
entity:
domain: input_datetime
temperatur_01:
name: 'Temperatur/01'
description: 'input_datetime.*'
selector:
entity:
domain: input_datetime
temperatur_02:
name: 'Temperatur/02'
description: 'input_datetime.*'
selector:
entity:
domain: input_datetime
temperatur_03:
name: 'Temperatur/03'
description: 'input_datetime.*'
selector:
entity:
domain: input_datetime
temperatur_04:
name: 'Temperatur/04'
description: 'input_datetime.*'
selector:
entity:
domain: input_datetime
temperatur_05:
name: 'Temperatur/05'
description: 'input_datetime.*'
selector:
entity:
domain: input_datetime
trigger:
- platform: state
entity_id: !input zeit_00
id: zeit_00
- platform: state
entity_id: !input zeit_01
id: zeit_01
- platform: state
entity_id: !input zeit_02
id: zeit_02
- platform: state
entity_id: !input zeit_03
id: zeit_03
- platform: state
entity_id: !input zeit_04
id: zeit_04
- platform: state
entity_id: !input zeit_05
id: zeit_05
action:
- if:
condition: trigger
id: zeit_00
then:
service: climate.set_temperature
data:
temperature: '{{ states(!input temperatur_00) | float }}'
target:
entity_id: !input heizung
- if:
condition: trigger
id: zeit_01
then:
service: climate.set_temperature
data:
temperature: '{{ states(!input temperatur_01) | float }}'
target:
entity_id: !input heizung
- if:
condition: trigger
id: zeit_02
then:
service: climate.set_temperature
data:
temperature: '{{ states(!input temperatur_02) | float }}'
target:
entity_id: !input heizung
- if:
condition: trigger
id: zeit_03
then:
service: climate.set_temperature
data:
temperature: '{{ states(!input temperatur_03) | float }}'
target:
entity_id: !input heizung
- if:
condition: trigger
id: zeit_04
then:
service: climate.set_temperature
data:
temperature: '{{ states(!input temperatur_04) | float }}'
target:
entity_id: !input heizung
- if:
condition: trigger
id: zeit_05
then:
service: climate.set_temperature
data:
temperature: '{{ states(!input temperatur_05) | float }}'
target:
entity_id: !input heizung
Basically, I have input_datetime.unten_arbeitszimmer_heizung_00
to input_datetime.unten_arbeitszimmer_heizung_05
per room (the unten_arbeitszimmer
part changes for each room there is). These are the times at which to trigger the automation, then there are input_number.unten_arbeitszimmer_heizung_00
to 05
, which are the wanted temperatures at those times.
The window
entity is currently not yet implemented, this is for later…
Originally, the part looked like this
- if:
condition: trigger
id: zeit_03
then:
- service: climate.set_temperature
data:
temperature: '{{ states(!input temperatur_03) | float }}'
target:
entity_id: !input heizung
But the produces the same error as the current code from above.
Thank you in advance for your help