Improve type hints in homekit and homekit_controller tests (#124213)

Add missing hass type hint in homekit and homekit_controller tests
This commit is contained in:
epenet 2024-08-20 12:47:41 +02:00 committed by GitHub
parent be255613de
commit db92f29c00
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 132 additions and 85 deletions

View file

@ -2,6 +2,7 @@
from collections.abc import Callable
from aiohomekit.model import Accessory
from aiohomekit.model.characteristics import CharacteristicsTypes
from aiohomekit.model.services import ServicesTypes
@ -12,7 +13,7 @@ from homeassistant.helpers import entity_registry as er
from .common import setup_test_component
def create_remote(accessory):
def create_remote(accessory: Accessory) -> None:
"""Define characteristics for a button (that is inn a group)."""
service_label = accessory.add_service(ServicesTypes.SERVICE_LABEL)
@ -37,7 +38,7 @@ def create_remote(accessory):
battery.add_char(CharacteristicsTypes.BATTERY_LEVEL)
def create_button(accessory):
def create_button(accessory: Accessory) -> None:
"""Define a button (that is not in a group)."""
button = accessory.add_service(ServicesTypes.STATELESS_PROGRAMMABLE_SWITCH)
@ -52,7 +53,7 @@ def create_button(accessory):
battery.add_char(CharacteristicsTypes.BATTERY_LEVEL)
def create_doorbell(accessory):
def create_doorbell(accessory: Accessory) -> None:
"""Define a button (that is not in a group)."""
button = accessory.add_service(ServicesTypes.DOORBELL)