Fix Yale Access Bluetooth not being available again after being unavailable (#81320)
parent
d87ca0b099
commit
eea4719544
|
@ -94,6 +94,19 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
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)
|
||||
entry.async_on_unload(entry.add_update_listener(_async_update_listener))
|
||||
return True
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"name": "Yale Access Bluetooth",
|
||||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/yalexs_ble",
|
||||
"requirements": ["yalexs-ble==1.9.4"],
|
||||
"requirements": ["yalexs-ble==1.9.5"],
|
||||
"dependencies": ["bluetooth"],
|
||||
"codeowners": ["@bdraco"],
|
||||
"bluetooth": [
|
||||
|
|
|
@ -2580,7 +2580,7 @@ xs1-api-client==3.0.0
|
|||
yalesmartalarmclient==0.3.9
|
||||
|
||||
# homeassistant.components.yalexs_ble
|
||||
yalexs-ble==1.9.4
|
||||
yalexs-ble==1.9.5
|
||||
|
||||
# homeassistant.components.august
|
||||
yalexs==1.2.6
|
||||
|
|
|
@ -1790,7 +1790,7 @@ xmltodict==0.13.0
|
|||
yalesmartalarmclient==0.3.9
|
||||
|
||||
# homeassistant.components.yalexs_ble
|
||||
yalexs-ble==1.9.4
|
||||
yalexs-ble==1.9.5
|
||||
|
||||
# homeassistant.components.august
|
||||
yalexs==1.2.6
|
||||
|
|
Loading…
Reference in New Issue