0.2.0: riscaldamento - obiettivo temperatura casa per zona, stato zone in copertina
This commit is contained in:
@@ -60,11 +60,25 @@ QString modeLabel(const QString &operatingStatus)
|
||||
return QStringLiteral("Stand-by");
|
||||
if (s == QLatin1String("OPERATING_STATUS_OFF"))
|
||||
return QStringLiteral("Spento");
|
||||
// Stato della pompa per zona (state.zoneN_mode).
|
||||
if (s == QLatin1String("PUMP_MODE_STATE_HEATING"))
|
||||
return QStringLiteral("Riscaldamento");
|
||||
if (s == QLatin1String("PUMP_MODE_STATE_COOLING"))
|
||||
return QStringLiteral("Raffrescamento");
|
||||
if (s == QLatin1String("PUMP_MODE_STATE_HOT_WATER"))
|
||||
return QStringLiteral("Acqua calda");
|
||||
if (s == QLatin1String("PUMP_MODE_STATE_IDLE"))
|
||||
return QStringLiteral("In attesa");
|
||||
if (s == QLatin1String("PUMP_MODE_STATE_STANDBY"))
|
||||
return QStringLiteral("Stand-by");
|
||||
if (s == QLatin1String("PUMP_MODE_STATE_OFF"))
|
||||
return QStringLiteral("Spento");
|
||||
if (s.isEmpty())
|
||||
return QStringLiteral("—");
|
||||
// Sconosciuto: togliamo il prefisso e mostriamo il resto, minuscolo.
|
||||
QString rest = s;
|
||||
rest.remove(QLatin1String("OPERATING_STATUS_"));
|
||||
rest.remove(QLatin1String("PUMP_MODE_STATE_"));
|
||||
return rest.toLower();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user