Restore homekit_controller BLE broadcast_key from disk (#81211)
* Restore homekit_controller BLE broadcast_key from disk Some accessories will sleep for a long time and only send broadcasted events which makes them have very long connection intervals to save battery. Since we need to connect to get a new broadcast key we now save the broadcast key between restarts to ensure we can decrypt the advertisments coming in even though we cannot make a connection to the device during startup. When we get a disconnected event later we will try again to connect and the device will be awake which will trigger a full sync * bump bump
This commit is contained in:
parent
770aefbd52
commit
208150c353
5 changed files with 16 additions and 20 deletions
|
@ -15,7 +15,7 @@ from aiohomekit.controller.abstract import (
|
|||
from aiohomekit.exceptions import AuthenticationError
|
||||
from aiohomekit.model.categories import Categories
|
||||
from aiohomekit.model.status_flags import StatusFlags
|
||||
from aiohomekit.utils import domain_supported, domain_to_name
|
||||
from aiohomekit.utils import domain_supported, domain_to_name, serialize_broadcast_key
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant import config_entries
|
||||
|
@ -577,6 +577,7 @@ class HomekitControllerFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
pairing.id,
|
||||
accessories_state.config_num,
|
||||
accessories_state.accessories.serialize(),
|
||||
serialize_broadcast_key(accessories_state.broadcast_key),
|
||||
)
|
||||
|
||||
return self.async_create_entry(title=name, data=pairing_data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue