Convert homekit fans to use service callbacks (#34229)
* Convert homekit fans to use service callbacks * Convert homekit fans to use service callbacks Service callbacks allow us ensure that we call fan services in the correct order. * Avoid calling turn_on if a speed is sent and the device is on * Fix test to not leave files behind * Fix test * Update homeassistant/components/homekit/type_fans.py Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io> Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
This commit is contained in:
1 parent
d6a47cb3e0
commit
e8710002b1
5 files changed
+420
-138
No files matched your search
@@ -15,8 +15,10 @@ def hk_driver():
|
||||
"pyhap.accessory_driver.AccessoryEncoder"
|
||||
), patch("pyhap.accessory_driver.HAPServer"), patch(
|
||||
"pyhap.accessory_driver.AccessoryDriver.publish"
|
||||
), patch(
|
||||
"pyhap.accessory_driver.AccessoryDriver.persist"
|
||||
):
|
||||
return AccessoryDriver(pincode=b"123-45-678", address="127.0.0.1")
|
||||
yield AccessoryDriver(pincode=b"123-45-678", address="127.0.0.1")
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
||||
Reference in new issue
Block a user