From aa4ddf57bb0f9582eef144575965fe26510627cc Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Sun, 12 Feb 2023 22:10:09 +0100 Subject: [PATCH] Fix calculation of zone temperature in certain circumstances --- nymea-app/ui/mainviews/airconditioning/ZoneInfoWrapper.qml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nymea-app/ui/mainviews/airconditioning/ZoneInfoWrapper.qml b/nymea-app/ui/mainviews/airconditioning/ZoneInfoWrapper.qml index 0865f300..72fc8083 100644 --- a/nymea-app/ui/mainviews/airconditioning/ZoneInfoWrapper.qml +++ b/nymea-app/ui/mainviews/airconditioning/ZoneInfoWrapper.qml @@ -78,7 +78,6 @@ Item { shownThingIds: root.zone.indoorSensors } readonly property ThingsProxy indoorTempSensors: ThingsProxy { - id: tempSensors engine: _engine parentProxy: indoorSensors shownInterfaces: ["temperaturesensor"] @@ -182,11 +181,11 @@ Item { id: thingsRepeater model: ThingsProxy { engine: zone.thermostats.length > 0 || zone.indoorSensors.length > 0 ? _engine : null - shownThingIds: zone.thermostats + zone.indoorSensors + shownThingIds: zone.thermostats.concat(zone.indoorSensors) } delegate: Item { - readonly property Thing thing: indoorTempSensors.get(index) + readonly property Thing thing: index < thermostats.count ? thermostats.get(index) : indoorTempSensors.get(index - thermostats.count) readonly property State temperatureState: thing ? thing.stateByName("temperature") : null property double temp: temperatureState ? temperatureState.value : 0 onTempChanged: d.updateZoneTemperature()