From 8d6ed9dba51478b6c632e758dfd94e22c2aecf3d Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Wed, 22 Jan 2020 08:19:24 -0500 Subject: [PATCH] Fixed #226 - Sometimes switching thermostats errors The API call to thermostat.read_id in runtime detail was not excluding inactive thermostats. That messed up the cache, which caused an inactive thermostat to try and display in the thermostat switcher. --- js/component/card/runtime_sensor_detail.js | 6 +++++- js/component/card/runtime_thermostat_detail.js | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/js/component/card/runtime_sensor_detail.js b/js/component/card/runtime_sensor_detail.js index 1c02a31..83b0df5 100644 --- a/js/component/card/runtime_sensor_detail.js +++ b/js/component/card/runtime_sensor_detail.js @@ -144,7 +144,11 @@ beestat.component.card.runtime_sensor_detail.prototype.decorate_contents_ = func .add_call( 'thermostat', 'read_id', - {}, + { + 'attributes': { + 'inactive': 0 + } + }, 'thermostat' ) .set_callback(function(response) { diff --git a/js/component/card/runtime_thermostat_detail.js b/js/component/card/runtime_thermostat_detail.js index 25dfe24..9c1f22d 100644 --- a/js/component/card/runtime_thermostat_detail.js +++ b/js/component/card/runtime_thermostat_detail.js @@ -133,7 +133,11 @@ beestat.component.card.runtime_thermostat_detail.prototype.decorate_contents_ = .add_call( 'thermostat', 'read_id', - {}, + { + 'attributes': { + 'inactive': 0 + } + }, 'thermostat' ) .set_callback(function(response) {