Init file

This commit is contained in:
2026-06-09 15:56:41 +05:30
commit bdb39de038
3 changed files with 29 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
async function fetchTemperature(zoneId) {
const res = await fetch(`/api/v1/zones/${zoneId}/primary/temperature`);
return res.json();
}
// Don't change this function signature
export async function attachChart(chartInstance, zoneId) {
await fetchTemperature(zoneId).then(temp => {
chartInstance.update(temp);
});
}