Works in the template but does not pass for the sensor yaml

this works in the template in dev tools but will not pass the configuration test

it seems to have issues with the straight brackets tried other brackets to no avail

   - platform: template
     sensors:
       main_shower_temp:
         unit_of_measurement: "°F"
         value_template: 
          {{ '%.f' | format(state_attr('climate.main_shower','current_temperature') | float ) }}       
         friendly_name: "Main Shower Temperature" 

Hi, there is an error in your yaml syntax, try:

   - platform: template
     sensors:
       main_shower_temp:
         unit_of_measurement: "°F"
         value_template: 
           "{{ '%.f' | format(state_attr('climate.main_shower','current_temperature') | float ) }}"
         friendly_name: "Main Shower Temperature"

(double quotes around the template)

Templates only need to be quoted if they are on a single line. Multi-line templates should not be inside quotes. They do however need the multi-line indicator symbol, > which was missing. So this

         value_template: >
          {{ '%.f' | format(state_attr('climate.main_shower','current_temperature') | float ) }}       

Or this:

         value_template: "{{ '%.f' | format(state_attr('climate.main_shower','current_temperature') | float ) }}"    

The top one worked the bottom one did not though I did not understand the greater than symbol and quotes reasons in the template have e little better understanding now though still far from being a programmer LOL

Check this out: http://yaml-multiline.info/