Public Member Functions | |
| None | __init__ (self, HomeAssistant hass, str name, int port, str|None ip_address, EntityFilter entity_filter, bool exclude_accessory_mode, dict[str, Any] entity_config, str homekit_mode, list[str] advertise_ips, str entry_id, str entry_title, list[str]|None devices=None) |
| HomeAccessory|None | add_bridge_accessory (self, State state) |
| None | add_bridge_triggers_accessory (self, dr.DeviceEntry device, list[dict[str, Any]] device_triggers) |
| list[State] | async_configure_accessories (self) |
| None | async_reload_accessories (self, Iterable[str] entity_ids) |
| HomeAccessory|None | async_remove_bridge_accessory (self, int aid) |
| None | async_reset_accessories (self, Iterable[str] entity_ids) |
| None | async_start (self, *Any args) |
| None | async_stop (self, *Any args) |
| None | async_unpair (self) |
| bool | setup (self, AsyncZeroconf async_zeroconf_instance, str uuid) |
Public Attributes | |
| aid_storage | |
| bridge | |
| driver | |
| hass | |
| iid_storage | |
| status | |
Private Member Functions | |
| None | _async_add_trigger_accessories (self) |
| None | _async_configure_linked_sensors (self, er.RegistryEntry ent_reg_ent, dict[tuple[str, str|None], str] lookup, State state) |
| bool | _async_create_accessories (self) |
| HomeAccessory | _async_create_bridge_accessory (self, Iterable[State] entity_states) |
| HomeAccessory|None | _async_create_single_accessory (self, list[State] entity_states) |
| None | _async_purge_old_bridges (self, dr.DeviceRegistry dev_reg, tuple[str, str, str] identifier, tuple[str, str] connection) |
| None | _async_recreate_removed_accessories_in_bridge_mode (self, list[str] removed) |
| None | _async_register_bridge (self) |
| None | _async_reload_accessories_in_accessory_mode (self, Iterable[str] entity_ids) |
| None | _async_reload_accessories_in_bridge_mode (self, Iterable[str] entity_ids) |
| list[str] | _async_remove_accessories_by_entity_id (self, Iterable[str] entity_ids) |
| None | _async_reset_accessories_in_bridge_mode (self, Iterable[str] entity_ids) |
| None | _async_set_device_info_attributes (self, er.RegistryEntry ent_reg_ent, dr.DeviceRegistry dev_reg, str entity_id) |
| None | _async_show_setup_message (self) |
| None | _async_shutdown_accessory (self, HomeAccessory accessory) |
| bool | _async_update_accessories_hash (self) |
| None | _fill_config_from_device_registry_entry (self, dr.DeviceEntry device_entry, dict[str, Any] config) |
| bool | _would_exceed_max_devices (self, str|None name) |
Private Attributes | |
| _advertise_ips | |
| _cancel_reload_dispatcher | |
| _devices | |
| _entry_id | |
| _entry_title | |
| _exclude_accessory_mode | |
| _filter | |
| _homekit_mode | |
| _ip_address | |
| _name | |
| _port | |
| _reset_lock | |
Class to handle all actions between HomeKit and Home Assistant.
Definition at line 531 of file __init__.py.
| None homeassistant.components.homekit.HomeKit.__init__ | ( | self, | |
| HomeAssistant | hass, | ||
| str | name, | ||
| int | port, | ||
| str | None | ip_address, | ||
| EntityFilter | entity_filter, | ||
| bool | exclude_accessory_mode, | ||
| dict[str, Any] | entity_config, | ||
| str | homekit_mode, | ||
| list[str] | advertise_ips, | ||
| str | entry_id, | ||
| str | entry_title, | ||
| list[str] | None | devices = None |
||
| ) |
Initialize a HomeKit object.
Definition at line 534 of file __init__.py.
|
private |
Add devices with triggers to the bridge.
Definition at line 1021 of file __init__.py.
|
private |
Definition at line 1093 of file __init__.py.
|
private |
Create the accessories.
Definition at line 1064 of file __init__.py.
|
private |
Create a HomeKit bridge with accessories. (bridge mode).
Definition at line 1008 of file __init__.py.
|
private |
Create a single HomeKit accessory (accessory mode).
Definition at line 984 of file __init__.py.
|
private |
Purge bridges that exist from failed pairing or manual resets.
Definition at line 964 of file __init__.py.
|
private |
Recreate removed accessories in bridge mode.
Definition at line 698 of file __init__.py.
|
private |
Register the bridge as a device so homekit_controller and exclude it from discovery.
Definition at line 930 of file __init__.py.
|
private |
Reset accessories in accessory mode.
Definition at line 639 of file __init__.py.
|
private |
Reload accessories in bridge mode.
Definition at line 691 of file __init__.py.
|
private |
Remove accessories by entity id.
Definition at line 659 of file __init__.py.
|
private |
Reset accessories in bridge mode.
Definition at line 676 of file __init__.py.
|
private |
Set attributes that will be used for homekit device info.
Definition at line 1148 of file __init__.py.
|
private |
Show the pairing setup message.
Definition at line 900 of file __init__.py.
|
private |
Shutdown an accessory.
Definition at line 626 of file __init__.py.
|
private |
Update the accessories hash.
Definition at line 713 of file __init__.py.
|
private |
Populate a config dict from the registry.
Definition at line 1168 of file __init__.py.
|
private |
Check if adding another devices would reach the limit and log.
Definition at line 768 of file __init__.py.
| HomeAccessory | None homeassistant.components.homekit.HomeKit.add_bridge_accessory | ( | self, | |
| State | state | ||
| ) |
Try adding accessory to bridge if configured beforehand.
Definition at line 729 of file __init__.py.
| None homeassistant.components.homekit.HomeKit.add_bridge_triggers_accessory | ( | self, | |
| dr.DeviceEntry | device, | ||
| list[dict[str, Any]] | device_triggers | ||
| ) |
Add device automation triggers to the bridge.
Definition at line 784 of file __init__.py.
| list[State] homeassistant.components.homekit.HomeKit.async_configure_accessories | ( | self | ) |
Configure accessories for the included states.
Definition at line 820 of file __init__.py.
| None homeassistant.components.homekit.HomeKit.async_reload_accessories | ( | self, | |
| Iterable[str] | entity_ids | ||
| ) |
Reload the accessory to load the latest configuration.
Definition at line 616 of file __init__.py.
| HomeAccessory | None homeassistant.components.homekit.HomeKit.async_remove_bridge_accessory | ( | self, | |
| int | aid | ||
| ) |
Try adding accessory to bridge if configured beforehand.
Definition at line 813 of file __init__.py.
| None homeassistant.components.homekit.HomeKit.async_reset_accessories | ( | self, | |
| Iterable[str] | entity_ids | ||
| ) |
Reset the accessory to load the latest configuration.
Definition at line 606 of file __init__.py.
| None homeassistant.components.homekit.HomeKit.async_start | ( | self, | |
| *Any | args | ||
| ) |
Load storage and start.
Definition at line 860 of file __init__.py.
| None homeassistant.components.homekit.HomeKit.async_stop | ( | self, | |
| *Any | args | ||
| ) |
Stop the accessory driver.
Definition at line 1080 of file __init__.py.
| None homeassistant.components.homekit.HomeKit.async_unpair | ( | self | ) |
Remove all pairings for an accessory so it can be repaired.
Definition at line 913 of file __init__.py.
| bool homeassistant.components.homekit.HomeKit.setup | ( | self, | |
| AsyncZeroconf | async_zeroconf_instance, | ||
| str | uuid | ||
| ) |
Set up bridge and accessory driver. Returns True if data was loaded from disk Returns False if the persistent data was not loaded
Definition at line 572 of file __init__.py.
|
private |
Definition at line 559 of file __init__.py.
|
private |
Definition at line 865 of file __init__.py.
|
private |
Definition at line 563 of file __init__.py.
|
private |
Definition at line 560 of file __init__.py.
|
private |
Definition at line 561 of file __init__.py.
|
private |
Definition at line 558 of file __init__.py.
|
private |
Definition at line 554 of file __init__.py.
|
private |
Definition at line 562 of file __init__.py.
|
private |
Definition at line 553 of file __init__.py.
|
private |
Definition at line 551 of file __init__.py.
|
private |
Definition at line 552 of file __init__.py.
|
private |
Definition at line 569 of file __init__.py.
| homeassistant.components.homekit.HomeKit.aid_storage |
Definition at line 872 of file __init__.py.
| homeassistant.components.homekit.HomeKit.bridge |
Definition at line 1014 of file __init__.py.
| homeassistant.components.homekit.HomeKit.driver |
Definition at line 581 of file __init__.py.
| homeassistant.components.homekit.HomeKit.hass |
Definition at line 550 of file __init__.py.
| homeassistant.components.homekit.HomeKit.iid_storage |
Definition at line 873 of file __init__.py.
| homeassistant.components.homekit.HomeKit.status |
Definition at line 566 of file __init__.py.