Refactor homekit to use a dataclass for entry data (#101738)
This commit is contained in:
parent
6c65db2036
commit
265f6653c3
7 changed files with 52 additions and 38 deletions
15
homeassistant/components/homekit/models.py
Normal file
15
homeassistant/components/homekit/models.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
"""Models for the HomeKit component."""
|
||||
from dataclasses import dataclass
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from . import HomeKit
|
||||
|
||||
|
||||
@dataclass
|
||||
class HomeKitEntryData:
|
||||
"""Class to hold HomeKit data."""
|
||||
|
||||
homekit: "HomeKit"
|
||||
pairing_qr: bytes | None = None
|
||||
pairing_qr_secret: str | None = None
|
Loading…
Add table
Add a link
Reference in a new issue