Fix calculation of zone temperature in certain circumstances
This commit is contained in:
parent
3f68bd84b8
commit
aa4ddf57bb
@ -78,7 +78,6 @@ Item {
|
|||||||
shownThingIds: root.zone.indoorSensors
|
shownThingIds: root.zone.indoorSensors
|
||||||
}
|
}
|
||||||
readonly property ThingsProxy indoorTempSensors: ThingsProxy {
|
readonly property ThingsProxy indoorTempSensors: ThingsProxy {
|
||||||
id: tempSensors
|
|
||||||
engine: _engine
|
engine: _engine
|
||||||
parentProxy: indoorSensors
|
parentProxy: indoorSensors
|
||||||
shownInterfaces: ["temperaturesensor"]
|
shownInterfaces: ["temperaturesensor"]
|
||||||
@ -182,11 +181,11 @@ Item {
|
|||||||
id: thingsRepeater
|
id: thingsRepeater
|
||||||
model: ThingsProxy {
|
model: ThingsProxy {
|
||||||
engine: zone.thermostats.length > 0 || zone.indoorSensors.length > 0 ? _engine : null
|
engine: zone.thermostats.length > 0 || zone.indoorSensors.length > 0 ? _engine : null
|
||||||
shownThingIds: zone.thermostats + zone.indoorSensors
|
shownThingIds: zone.thermostats.concat(zone.indoorSensors)
|
||||||
}
|
}
|
||||||
|
|
||||||
delegate: Item {
|
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
|
readonly property State temperatureState: thing ? thing.stateByName("temperature") : null
|
||||||
property double temp: temperatureState ? temperatureState.value : 0
|
property double temp: temperatureState ? temperatureState.value : 0
|
||||||
onTempChanged: d.updateZoneTemperature()
|
onTempChanged: d.updateZoneTemperature()
|
||||||
|
|||||||
Reference in New Issue
Block a user