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

pull/11000/merge
cdce8p 2018-03-14 13:22:38 +01:00 committed by GitHub
parent b6bed1dfab
commit c48c8710b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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)