mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[ecobee] fix NullPointerException in EcobeeAccountBridgeHandler.refreshThermostats() (#16442)
Signed-off-by: Rob Nielsen <rob.nielsen@yahoo.com> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
parent
6e8f57b3d3
commit
90ffee03c6
@ -220,10 +220,13 @@ public class EcobeeAccountBridgeHandler extends BaseBridgeHandler {
|
||||
refreshThermostatsCounter.set(refreshIntervalNormal);
|
||||
SummaryResponseDTO summary = api.performThermostatSummaryQuery();
|
||||
if (summary != null && summary.hasChanged(previousSummary) && !thermostatIds.isEmpty()) {
|
||||
for (ThermostatDTO thermostat : api.performThermostatQuery(thermostatIds)) {
|
||||
EcobeeThermostatBridgeHandler handler = thermostatHandlers.get(thermostat.identifier);
|
||||
if (handler != null) {
|
||||
handler.updateChannels(thermostat);
|
||||
List<ThermostatDTO> thermostats = api.performThermostatQuery(thermostatIds);
|
||||
if (thermostats != null) {
|
||||
for (ThermostatDTO thermostat : thermostats) {
|
||||
EcobeeThermostatBridgeHandler handler = thermostatHandlers.get(thermostat.identifier);
|
||||
if (handler != null) {
|
||||
handler.updateChannels(thermostat);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user