Refactor homekit_controller to prepare for more typing information (#65329)

This commit is contained in:
Jc2k 2022-01-31 22:48:16 +00:00 committed by GitHub
parent a9af29cbe0
commit 0f88790303
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 139 additions and 179 deletions

View file

@ -9,7 +9,7 @@ def create_switch_with_setup_button(accessory):
"""Define setup button characteristics."""
service = accessory.add_service(ServicesTypes.OUTLET)
setup = service.add_char(CharacteristicsTypes.Vendor.HAA_SETUP)
setup = service.add_char(CharacteristicsTypes.VENDOR_HAA_SETUP)
setup.value = ""
setup.format = "string"
@ -24,7 +24,7 @@ def create_switch_with_ecobee_clear_hold_button(accessory):
"""Define setup button characteristics."""
service = accessory.add_service(ServicesTypes.OUTLET)
setup = service.add_char(CharacteristicsTypes.Vendor.ECOBEE_CLEAR_HOLD)
setup = service.add_char(CharacteristicsTypes.VENDOR_ECOBEE_CLEAR_HOLD)
setup.value = ""
setup.format = "string"
@ -57,7 +57,7 @@ async def test_press_button(hass):
button.async_assert_service_values(
ServicesTypes.OUTLET,
{
CharacteristicsTypes.Vendor.HAA_SETUP: "#HAA@trcmd",
CharacteristicsTypes.VENDOR_HAA_SETUP: "#HAA@trcmd",
},
)
@ -86,6 +86,6 @@ async def test_ecobee_clear_hold_press_button(hass):
clear_hold.async_assert_service_values(
ServicesTypes.OUTLET,
{
CharacteristicsTypes.Vendor.ECOBEE_CLEAR_HOLD: True,
CharacteristicsTypes.VENDOR_ECOBEE_CLEAR_HOLD: True,
},
)