Fix switchbot not setting up when already connected at startup (#78198)

pull/78202/head
J. Nick Koston 2022-09-10 12:32:38 -05:00 committed by GitHub
parent 1e302c12ff
commit dbcb269111
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -84,7 +84,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
address: str = entry.data[CONF_ADDRESS]
ble_device = bluetooth.async_ble_device_from_address(
hass, address.upper(), connectable
)
) or await switchbot.get_device(address)
if not ble_device:
raise ConfigEntryNotReady(
f"Could not find Switchbot {sensor_type} with address {address}"

View File

@ -2,7 +2,7 @@
"domain": "switchbot",
"name": "SwitchBot",
"documentation": "https://www.home-assistant.io/integrations/switchbot",
"requirements": ["PySwitchbot==0.19.1"],
"requirements": ["PySwitchbot==0.19.2"],
"config_flow": true,
"dependencies": ["bluetooth"],
"codeowners": [

View File

@ -37,7 +37,7 @@ PyRMVtransport==0.3.3
PySocks==1.7.1
# homeassistant.components.switchbot
PySwitchbot==0.19.1
PySwitchbot==0.19.2
# homeassistant.components.transport_nsw
PyTransportNSW==0.1.1

View File

@ -33,7 +33,7 @@ PyRMVtransport==0.3.3
PySocks==1.7.1
# homeassistant.components.switchbot
PySwitchbot==0.19.1
PySwitchbot==0.19.2
# homeassistant.components.transport_nsw
PyTransportNSW==0.1.1