Skip to content

Commit

Permalink
[ecobee] fix NullPointerException in EcobeeAccountBridgeHandler.refre…
Browse files Browse the repository at this point in the history
…shThermostats() (#16442)

Signed-off-by: Rob Nielsen <rob.nielsen@yahoo.com>
  • Loading branch information
robnielsen committed Feb 22, 2024
1 parent dc1211b commit 18c86b4
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,13 @@ private void refreshThermostats() {
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);
}
}
}
}
Expand Down

0 comments on commit 18c86b4

Please sign in to comment.