Skip to content
Snippets Groups Projects
Unverified Commit c48c8710 authored by cdce8p's avatar cdce8p Committed by GitHub
Browse files

Bugfix HomeKit: Error string values for temperature (#13162)

parent b6bed1df
Branches
Tags
No related merge requests found
...@@ -157,12 +157,12 @@ class Thermostat(HomeAccessory): ...@@ -157,12 +157,12 @@ class Thermostat(HomeAccessory):
# Update current temperature # Update current temperature
current_temp = new_state.attributes.get(ATTR_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) self.char_current_temp.set_value(current_temp)
# Update target temperature # Update target temperature
target_temp = new_state.attributes.get(ATTR_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: if not self.temperature_flag_target_state:
self.char_target_temp.set_value(target_temp, self.char_target_temp.set_value(target_temp,
should_callback=False) should_callback=False)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment