Homekit component test bugfixes for py3.5
This commit is contained in:
1 parent
722b9ba49b
commit
42ab4e1366
4 files changed
+15
-10
No files matched your search
@@ -45,6 +45,9 @@ class TemperatureSensor(HomeAccessory):
|
||||
def update_temperature(self, entity_id=None, old_state=None,
|
||||
new_state=None):
|
||||
"""Update temperature after state changed."""
|
||||
if new_state is None:
|
||||
return
|
||||
|
||||
temperature = new_state.state
|
||||
if temperature != STATE_UNKNOWN:
|
||||
self.char_temp.set_value(float(temperature))
|
||||
Reference in new issue
Block a user