chpiero
(chpiero)
August 25, 2020, 5:03pm
1
hi, i have this kind of error
Error loading /config/configuration.yaml: while parsing a block mapping
in “/config/binary_sensors.yaml”, line 32, column 10
expected , but found ‘’
in “/config/binary_sensors.yaml”, line 32, column 43
with this code:
- platform: template
sensors:
tap:
value_template: "{{ if is_state("cover.tap","open")}}on{{elif is_state("cover.tap","closing")}}off{{ endif }}"
friendly_name: "tap"
any suggestion?
I don’t think it likes all the double quotes.
Try sounding the template with singles instead
For example:
value_template: '{{ if is_state("cove......
francisp
(Francis)
August 25, 2020, 5:40pm
3
try
- platform: template
sensors:
tap:
value_template: "{{ is_state("cover.tap","open") }}"
friendly_name: "tap"
tom_l
August 26, 2020, 12:55am
4
Look how your quotes open and close:
francisp:
"{{ is_state("
Use double quotes outside the template and single quotes inside that. As suggested by jivesinger.