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:
custom_fields:
pjet: >
[[[
if (states["sensor.tankerkoenig_jet_wuelfrath_wilhelmstr_34_38_e10"].state
== "unknown") return "CLOSE"; else return
states['sensor.tankerkoenig_jet_wuelfrath_wilhelmstr_34_38_e10'].state
]]]
Thanks for your help.
Kind regards,
Andreas