Add temperature-units config option

This commit is contained in:
James Babcock committed 2026-10-24 00:16:50 -07:00
1 parent 1780057f3c
commit 5256ab1ddc
8 files changed
+48 -6

No files matched your search

+2 -1
View File
@@ -1,6 +1,7 @@
import { renderSvgIcon } from "../../graphics/icons";
import { type GrayImage, type UiFont } from "../../graphics/image";
import { type WeatherCondition, type WeatherState } from "../../native/weather";
import { formatTemperature } from "./temperature-format";
// Lucide weather icons (ISC licensed), kept verbatim so they can be diffed
// against upstream.
@@ -90,7 +91,7 @@ export function weatherReading(state: WeatherState, nowMs: number): WeatherReadi
return {
condition: current.condition,
isDaytime: current.isDaytime,
temperature: current.temperatureF === null ? "--°" : `${Math.round(current.temperatureF)}°`,
temperature: current.temperatureF === null ? "--°" : formatTemperature(current.temperatureF, false),
};
}