Blueprint Import template formatting

I have created several Blueprints for sharing on this system.
One thing that bugs me is that when the blueprint import is used, it tends to make a jinja sequence, while still functional, very hard to see what is happening.

Perhaps the import formatting could be cleaned up so that the templates arrive in the same format as they leave the master copy.

For instance, this blueprint:

Leaves the repository with a template section looking like this:

    sequence:
    - service: mqtt.publish
      data:
        topic: !input 'mqtt_fan_topic'
        payload: >
          {% if room_temp_now_val < room_set_temp_val %}
          {# Room is cooler (or warmer) than set temp so turn fan OFF. #}
            0
          {% elif room_temp_now_val < (room_set_temp_val + temp_gap_1_to_2_var) %}
          {# Room is at the temp where the fan should be at LOW speed. #}
            1
          {% elif room_temp_now_val < (room_set_temp_val + temp_gap_1_to_2_var + temp_gap_2_to_3_var) %} 
          {# Room is at the temp where the fan should be at MEDIUM speed. #}
            2
          {% else %} 
          {# Room is warm (or cold) enough to be on HIGH speed, #}
            3
          {% endif %}
        qos: 1
        retain: false

And arrives in the new users repository looking like this:

    sequence:
    - service: mqtt.publish
      data:
        topic: !input 'mqtt_fan_topic'
        payload: "{% if room_temp_now_val < room_set_temp_val %} {# Room is cooler\
          \ (or warmer) than set temp so turn fan OFF. #}\n  0\n{% elif room_temp_now_val\
          \ < (room_set_temp_val + temp_gap_1_to_2_var) %} {# Room is at the temp\
          \ where the fan should be at LOW speed. #}\n  1\n{% elif room_temp_now_val\
          \ < (room_set_temp_val + temp_gap_1_to_2_var + temp_gap_2_to_3_var) %} \
          \ {# Room is at the temp where the fan should be at MEDIUM speed. #}\n \
          \ 2\n{% else %}  {# Room is warm (or cold) enough to be on HIGH speed, #}\n\
          \  3\n{% endif %}\n"
        qos: 1
        retain: false

It’s perfectly functional, and in the trace displays it looks proper and readable. The issue is that in order to troubleshoot or change it, you would have to reformat it so it makes sense to the user. Generally the people using blueprints would look at that and say What is that? Therefore not helpful…

It’s not just for blueprints; it stores all multi-line templates that way (and has been doing that for a long time).

I’m not disagreeing with your request, just pointing out it’s a long-standing practice (use the Automation Editor in YAML mode to create a multi-line template and, after saving it, examine the template’s new formatting). It’s probably because they don’t save templates verbatim and rely on a parser (of some kind) to handle reading/writing it.

Good to know.
Good for storage space I suppose, bad for troubleshooting it. I know we can just copy paste the original as well for this…

Just thought it was worth a look at as an [FR].