Fix Yale Access Bluetooth not being available again after being unavailable (#81320)
This commit is contained in:
parent
356953c8bc
commit
882ad31a99
4 changed files with 16 additions and 3 deletions
|
@ -94,6 +94,19 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||||
entry.title, push_lock
|
entry.title, push_lock
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@callback
|
||||||
|
def _async_device_unavailable(
|
||||||
|
_service_info: bluetooth.BluetoothServiceInfoBleak,
|
||||||
|
) -> None:
|
||||||
|
"""Handle device not longer being seen by the bluetooth stack."""
|
||||||
|
push_lock.reset_advertisement_state()
|
||||||
|
|
||||||
|
entry.async_on_unload(
|
||||||
|
bluetooth.async_track_unavailable(
|
||||||
|
hass, _async_device_unavailable, push_lock.address
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
|
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
|
||||||
entry.async_on_unload(entry.add_update_listener(_async_update_listener))
|
entry.async_on_unload(entry.add_update_listener(_async_update_listener))
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"name": "Yale Access Bluetooth",
|
"name": "Yale Access Bluetooth",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/yalexs_ble",
|
"documentation": "https://www.home-assistant.io/integrations/yalexs_ble",
|
||||||
"requirements": ["yalexs-ble==1.9.4"],
|
"requirements": ["yalexs-ble==1.9.5"],
|
||||||
"dependencies": ["bluetooth"],
|
"dependencies": ["bluetooth"],
|
||||||
"codeowners": ["@bdraco"],
|
"codeowners": ["@bdraco"],
|
||||||
"bluetooth": [
|
"bluetooth": [
|
||||||
|
|
|
@ -2577,7 +2577,7 @@ xs1-api-client==3.0.0
|
||||||
yalesmartalarmclient==0.3.9
|
yalesmartalarmclient==0.3.9
|
||||||
|
|
||||||
# homeassistant.components.yalexs_ble
|
# homeassistant.components.yalexs_ble
|
||||||
yalexs-ble==1.9.4
|
yalexs-ble==1.9.5
|
||||||
|
|
||||||
# homeassistant.components.august
|
# homeassistant.components.august
|
||||||
yalexs==1.2.6
|
yalexs==1.2.6
|
||||||
|
|
|
@ -1787,7 +1787,7 @@ xmltodict==0.13.0
|
||||||
yalesmartalarmclient==0.3.9
|
yalesmartalarmclient==0.3.9
|
||||||
|
|
||||||
# homeassistant.components.yalexs_ble
|
# homeassistant.components.yalexs_ble
|
||||||
yalexs-ble==1.9.4
|
yalexs-ble==1.9.5
|
||||||
|
|
||||||
# homeassistant.components.august
|
# homeassistant.components.august
|
||||||
yalexs==1.2.6
|
yalexs==1.2.6
|
||||||
|
|
Loading…
Add table
Reference in a new issue