mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 06:05:24 +00:00
13 lines
369 B
TypeScript
13 lines
369 B
TypeScript
import type { TemperatureSensor } from "@/types/stats-widgets";
|
|
|
|
export function selectTemperatureSensor(
|
|
sensors: TemperatureSensor[],
|
|
preferredLabel: string,
|
|
) {
|
|
return sensors.find((sensor) => sensor.label === preferredLabel) ?? null;
|
|
}
|
|
|
|
export function temperaturePreferenceKey(hostId: number) {
|
|
return `termix-host-metrics:${hostId}:temperature-sensor`;
|
|
}
|