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:
parent
be255613de
commit
db92f29c00
24 changed files with 132 additions and 85 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue