Increment the homekit config version when restarting (#47209)

If an entity changes between restart the iOS/controller
device may have cached the old chars for the accessory.
To force the iOS/controller to reload the chars, we
increment the config version when Home Assistant restarts
This commit is contained in:
J. Nick Koston 2021-02-28 22:42:09 -06:00 committed by GitHub
parent 0e9f2dc272
commit 853da40e70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -540,6 +540,7 @@ async def test_homekit_start(hass, hk_driver, device_reg):
assert (device_registry.CONNECTION_NETWORK_MAC, formatted_mac) in device.connections
assert len(device_reg.devices) == 1
assert homekit.driver.state.config_version == 2
async def test_homekit_start_with_a_broken_accessory(hass, hk_driver, mock_zeroconf):