mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-22 07:24:24 +01:00
round result
This commit is contained in:
@@ -45,7 +45,7 @@ def rgb_dec565(rgb_color):
|
|||||||
|
|
||||||
def convert_temperature_from_celsius(c, unit):
|
def convert_temperature_from_celsius(c, unit):
|
||||||
if unit == "fahrenheit":
|
if unit == "fahrenheit":
|
||||||
temp = (c * 1.8) + 32
|
temp = round(((c * 1.8) + 32), 1)
|
||||||
return f"{temp}°F"
|
return f"{temp}°F"
|
||||||
else:
|
else:
|
||||||
return f"{c}°C"
|
return f"{c}°C"
|
||||||
|
|||||||
Reference in New Issue
Block a user