Skip to content

Commit

Permalink
Fix switchbot not setting up when already connected at startup (#78198)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Sep 10, 2022
1 parent 1e302c1 commit dbcb269
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/switchbot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/switchbot/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dbcb269

Please sign in to comment.