From c48c8710b7f34b18ad946aadedb59262fbfcd6ba Mon Sep 17 00:00:00 2001 From: cdce8p <30130371+cdce8p@users.noreply.github.com> Date: Wed, 14 Mar 2018 13:22:38 +0100 Subject: [PATCH] Bugfix HomeKit: Error string values for temperature (#13162) --- homeassistant/components/homekit/thermostats.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/homekit/thermostats.py b/homeassistant/components/homekit/thermostats.py index 766a7e3585d..6d342273e8d 100644 --- a/homeassistant/components/homekit/thermostats.py +++ b/homeassistant/components/homekit/thermostats.py @@ -157,12 +157,12 @@ class Thermostat(HomeAccessory): # Update current temperature current_temp = new_state.attributes.get(ATTR_CURRENT_TEMPERATURE) - if current_temp is not None: + if isinstance(current_temp, (int, float)): self.char_current_temp.set_value(current_temp) # Update target temperature target_temp = new_state.attributes.get(ATTR_TEMPERATURE) - if target_temp is not None: + if isinstance(target_temp, (int, float)): if not self.temperature_flag_target_state: self.char_target_temp.set_value(target_temp, should_callback=False) -- GitLab