Trying to get a template sensor created and add attributes to it. This is what I tried from docs
template:
sensors:
SunnyAngle:
unit_of_measurement: "°"
value_template: "{{ '%+.1f'|format(state_attr('sun.sun', 'elevation')) }}"
attribute_templates:
temp: >-
{{ '%+.1f'|format(state_attr('sun.sun', 'elevation')) }}
From the logs
Invalid config for [template]: [attribute_templates] is an invalid option for [template]. Check: template->sensor->0->attribute_templates. (See /config/configuration.yaml, line 40).