I’ve a little problem with following code and do not know the matter. May be somebody can help me.
I’ve an “input_select” with for parameters as text. Within in an automation the result should be send as “int” via json to my boiler system. So far so good and in the Dev Template Editor it works, but if I put the same code into my yaml I got an error.
in my boiler.yaml…
automation:
- alias: "Set Beriebsart_Selection"
trigger:
platform: state
entity_id: input_select.bsb_lan_hzk1_betriebsart_selection
action:
service: rest_command.bsb_lan_set_parameter
data:
topic: "beriebsart_selection"
parameter: 700
value: "{{ states('input_select.bsb_lan_hzk1_betriebsart_selection') | replace("Schutz", "0") | replace("Auto", "1") | replace("Reduziert", "2") | replace("Komfort", "3") | trim | int }}"
Error:
bad indentation of a mapping entry (43:89)
40 | …
41 | …
42 | …
43 | … ebsart_selection’) | replace(“Schutz”, “0”) | replace(“Auto”, …
----------------------------------^
Where are is my mistake ?