[ecobee] fix NullPointerException in EcobeeAccountBridgeHandler.refreshThermostats() (#16442)

Signed-off-by: Rob Nielsen <rob.nielsen@yahoo.com>
This commit is contained in:
robnielsen
2024-02-22 08:45:55 +01:00
committed by GitHub
parent dc1211b267
commit 18c86b4c58
@@ -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);
}
}
}
}