I am trying to make a template sensor to track my HVAC preset mode.
I have the final line double checked in the developer tools and it provides the correct value.
However i get an error about my configuration value
"Cannot read an implicit mapping pair; a colon is missed (40:69) with and error point to the m in ‘preset_mode’
# Template Sensor
#1st Floor Climate
template:
- sensor:
- name: '1st Floor Preset Mode'
state:'{{ state_attr('climate.1st_floor_2', 'preset_mode') }}'
any thoughts?
EDIT with solution:
Missed a space before State_attr
Need different quotes inside and outside
# Template Sensor
# 1st Floor Climate
template:
- sensor:
- name: '1st Floor Preset Mode'
state: "{{ state_attr('climate.1st_floor_2', 'preset_mode') }}"