0.7.9: via la barra di avanzamento dell'acqua

Partiva da 10 °C e stava sempre al 99%: non diceva niente. Tolta dal componente
ReadingCell (la usava solo la Home) e con essa la funzione waterProgress.
This commit is contained in:
Carlo
2026-10-11 18:52:08 +02:00
parent 1e2f5bbea3
commit 78eb283c9b
6 changed files with 28 additions and 25 deletions
-11
View File
@@ -47,15 +47,6 @@ Page {
return "#4caf50"
}
// Quanto e' carica l'acqua calda verso l'obiettivo (da 10 °C in su).
function waterProgress() {
var ora = Number(page.raw("dhw_current"))
var obiettivo = Number(page.raw("dhw_target"))
if (!(obiettivo > 10) || isNaN(ora))
return 0
return (ora - 10) / (obiettivo - 10)
}
// Riga sotto il titolo: dice anche quando i numeri sono vecchi.
function updateText() {
if (!api.hasData)
@@ -220,8 +211,6 @@ Page {
title: qsTr("Hot water")
value: page.fmt(page.raw("dhw_current")) + " °C"
subtitle: qsTr("target %1 °C").arg(page.fmt(page.raw("dhw_target")))
progress: page.waterProgress()
showBar: true
valueColor: api.stale ? Theme.secondaryColor : Theme.primaryColor
onTapped: pageStack.push(Qt.resolvedUrl("SetpointsPage.qml"),
{ "section": "water" })