mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 06:07:17 +00:00
Bugfix HomeKit: Error string values for temperature (#13162)
This commit is contained in:
parent
b6bed1dfab
commit
c48c8710b7
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user