If I format my yaml like this:
target:
entity_id: input_number.cost_today
data:
value: |
{{ (float(states('sensor.smart_meter_electricity_import_standing_charge')) +
float(states('input_number.cost_today_night_component')) ) | round(2) }}
Save and reopen the Automation, it is reformatted like this:
target:
entity_id: input_number.cost_today
data:
value: >
{{
(float(states('sensor.smart_meter_electricity_import_standing_charge'))
+
float(states('input_number.cost_today_night_component')) ) | round(2) }}
The pipe “|” (literal) has changed to a “greater than” (folded) styles.
This is not universal across my code! I know yaml in images is frowned upon, but I wish to show you this:
The top pipe “|” is retained the bottom one is replaced. Why?
Regards, Martin