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,8 +2,9 @@
from collections.abc import Callable
from aiohomekit.model import Accessory
from aiohomekit.model.characteristics import CharacteristicsTypes
from aiohomekit.model.services import ServicesTypes
from aiohomekit.model.services import Service, ServicesTypes
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
@ -11,7 +12,7 @@ from homeassistant.helpers import entity_registry as er
from .common import Helper, setup_test_component
def create_switch_with_setup_button(accessory):
def create_switch_with_setup_button(accessory: Accessory) -> Service:
"""Define setup button characteristics."""
service = accessory.add_service(ServicesTypes.OUTLET)
@ -26,7 +27,7 @@ def create_switch_with_setup_button(accessory):
return service
def create_switch_with_ecobee_clear_hold_button(accessory):
def create_switch_with_ecobee_clear_hold_button(accessory: Accessory) -> Service:
"""Define setup button characteristics."""
service = accessory.add_service(ServicesTypes.OUTLET)