Custom Card - Commands Round and Replace

Hi, i use a custom Button Card on my Dashboard. This Card provide the price for Diesel from the gasoline station. The format for the price is 0.000 example: 2.029 for 2,029 EUR. My task is round to 2,03 and replace . with ,

This is my current code:

  pjet: >

    if (states["sensor.tankerkoenig_jet_wuelfrath_wilhelmstr_34_38_e10"].state
    == "unknown") return "CLOSE"; else return

Forum custom card

Thanks for your help.

Kind regards,

I found a solution: I create a template in sensor.yaml