Bump led-ble to 0.8.3 (#78188)

* Bump led-ble to 0.8.0

Fixes setup when the previous shutdown was not clean and
the device is still connected

* bump again

* bump again

* bump again
pull/78169/head
J. Nick Koston 2022-09-10 12:30:30 -05:00 committed by Paulus Schoutsen
parent 795be361b4
commit 5f90760176
5 changed files with 9 additions and 7 deletions

View File

@ -6,7 +6,7 @@ from datetime import timedelta
import logging
import async_timeout
from led_ble import BLEAK_EXCEPTIONS, LEDBLE
from led_ble import BLEAK_EXCEPTIONS, LEDBLE, get_device
from homeassistant.components import bluetooth
from homeassistant.components.bluetooth.match import ADDRESS, BluetoothCallbackMatcher
@ -27,7 +27,9 @@ _LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Set up LED BLE from a config entry."""
address: str = entry.data[CONF_ADDRESS]
ble_device = bluetooth.async_ble_device_from_address(hass, address.upper(), True)
ble_device = bluetooth.async_ble_device_from_address(
hass, address.upper(), True
) or await get_device(address)
if not ble_device:
raise ConfigEntryNotReady(
f"Could not find LED BLE device with address {address}"

View File

@ -48,12 +48,12 @@ class LEDBLEEntity(CoordinatorEntity, LightEntity):
"""Initialize an ledble light."""
super().__init__(coordinator)
self._device = device
self._attr_unique_id = device._address
self._attr_unique_id = device.address
self._attr_device_info = DeviceInfo(
name=name,
model=hex(device.model_num),
sw_version=hex(device.version_num),
connections={(dr.CONNECTION_BLUETOOTH, device._address)},
connections={(dr.CONNECTION_BLUETOOTH, device.address)},
)
self._async_update_attrs()

View File

@ -3,7 +3,7 @@
"name": "LED BLE",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/ble_ble",
"requirements": ["led-ble==0.7.1"],
"requirements": ["led-ble==0.8.3"],
"dependencies": ["bluetooth"],
"codeowners": ["@bdraco"],
"bluetooth": [

View File

@ -968,7 +968,7 @@ lakeside==0.12
laundrify_aio==1.1.2
# homeassistant.components.led_ble
led-ble==0.7.1
led-ble==0.8.3
# homeassistant.components.foscam
libpyfoscam==1.0

View File

@ -706,7 +706,7 @@ lacrosse-view==0.0.9
laundrify_aio==1.1.2
# homeassistant.components.led_ble
led-ble==0.7.1
led-ble==0.8.3
# homeassistant.components.foscam
libpyfoscam==1.0