2018-01-25 17:41:49 ERROR (Thread-2) [homeassistant.util.yaml] while parsing a block mapping
in "/home/homeassistant/.homeassistant/automations/autoclimate.yaml", line 96, column 7
expected <block end>, but found '<scalar>'
Code:
value_template: '{{ if not is_state('alarm_control_panel.ha_alarm','armed_home')}}'
Double quotes around the value_template, not single.
value_template: "{{ if not is_state('alarm_control_panel.ha_alarm','armed_home')}}"
Your single quotes inside will conflict with single on the outside. So you need either double inside and single outside or double outside and single inside. I usually do the latter.
2018-01-25 18:02:04 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: invalid template (TemplateSyntaxError: expected token 'end of print stat$
not a valid value for dictionary value @ data['condition'][0]['condition']. Got None
required key not provided @ data['condition'][0]['entity_id']. Got None. (See /home/homeassistant/.homeassistant/configuration.yaml, line 379). Please check the docs a$
Code:
value_template: "{{ if not is_state('alarm_control_panel.ha_alarm','armed_home')}}"
It’s just a nuance of coding. Your string will always be a string that is inside quotes. So if you use the same quote for a string inside a string, the code doesn’t know that:
“I said “hello”” would parse as a string “I said” and “” with hello between it that is interpreted as a object or funcition.