led-ble
Advanced tools
+7
-8
@@ -1,9 +0,8 @@ | ||
| Metadata-Version: 2.1 | ||
| Metadata-Version: 2.3 | ||
| Name: led-ble | ||
| Version: 1.1.1 | ||
| Version: 1.1.4 | ||
| Summary: Control a wide range of LED BLE devices | ||
| Home-page: https://github.com/bluetooth-devices/led-ble | ||
| Author: J. Nick Koston | ||
| Author-email: nick@koston.org | ||
| Requires-Python: >=3.9,<4.0 | ||
| Requires-Python: >=3.9,<3.14 | ||
| Classifier: Development Status :: 2 - Pre-Alpha | ||
@@ -22,9 +21,9 @@ Classifier: Intended Audience :: Developers | ||
| Provides-Extra: docs | ||
| Requires-Dist: Sphinx (>=5.0,<6.0) ; extra == "docs" | ||
| Requires-Dist: Sphinx (>=5,<7) ; extra == "docs" | ||
| Requires-Dist: async-timeout (>=3.0.0) ; python_version < "3.11" | ||
| Requires-Dist: bleak (>=0.19.0) | ||
| Requires-Dist: bleak (>=0.22.0) | ||
| Requires-Dist: bleak-retry-connector (>=2.3.0) | ||
| Requires-Dist: flux-led (>=0.28.32) | ||
| Requires-Dist: myst-parser (>=0.18,<0.19) ; extra == "docs" | ||
| Requires-Dist: sphinx-rtd-theme (>=1.0,<2.0) ; extra == "docs" | ||
| Requires-Dist: myst-parser (>=0.18,<3.1) ; extra == "docs" | ||
| Requires-Dist: sphinx-rtd-theme (>=1,<4) ; extra == "docs" | ||
| Project-URL: Bug Tracker, https://github.com/bluetooth-devices/led-ble/issues | ||
@@ -31,0 +30,0 @@ Project-URL: Changelog, https://github.com/bluetooth-devices/led-ble/blob/main/CHANGELOG.md |
+10
-10
| [tool.poetry] | ||
| name = "led-ble" | ||
| version = "1.1.1" | ||
| version = "1.1.4" | ||
| description = "Control a wide range of LED BLE devices" | ||
@@ -26,10 +26,10 @@ authors = ["J. Nick Koston <nick@koston.org>"] | ||
| [tool.poetry.dependencies] | ||
| python = "^3.9" | ||
| python = ">=3.9,<3.14" | ||
| # Documentation Dependencies | ||
| Sphinx = {version = "^5.0", optional = true} | ||
| sphinx-rtd-theme = {version = "^1.0", optional = true} | ||
| myst-parser = {version = "^0.18", optional = true} | ||
| Sphinx = {version = ">=5,<7", optional = true} | ||
| sphinx-rtd-theme = {version = ">=1,<4", optional = true} | ||
| myst-parser = {version = ">=0.18,<3.1", optional = true} | ||
| bleak-retry-connector = ">=2.3.0" | ||
| bleak = ">=0.19.0" | ||
| bleak = ">=0.22.0" | ||
| async-timeout = {version = ">=3.0.0", python = "<3.11"} | ||
@@ -46,9 +46,9 @@ flux-led = ">=0.28.32" | ||
| [tool.poetry.dev-dependencies] | ||
| pytest = "^7.0" | ||
| pytest-cov = "^3.0" | ||
| pytest = "^8.3" | ||
| pytest-cov = "^6.0" | ||
| [tool.semantic_release] | ||
| branch = "main" | ||
| version_toml = "pyproject.toml:tool.poetry.version" | ||
| version_variable = "src/led_ble/__init__.py:__version__" | ||
| version_toml = ["pyproject.toml:tool.poetry.version"] | ||
| version_variables = ["src/led_ble/__init__.py:__version__"] | ||
| build_command = "pip install poetry && poetry build" | ||
@@ -55,0 +55,0 @@ |
| from __future__ import annotations | ||
| __version__ = "1.1.1" | ||
| __version__ = "1.1.4" | ||
@@ -5,0 +5,0 @@ |
+25
-15
@@ -54,3 +54,3 @@ from __future__ import annotations | ||
| DREAM_EFFECTS = {f"Effect {i+1}": i for i in range(0, 255)} | ||
| DREAM_EFFECTS = {f"Effect {i + 1}": i for i in range(0, 255)} | ||
| DREAM_EFFECT_LIST = list(DREAM_EFFECTS) | ||
@@ -354,15 +354,25 @@ | ||
| _LOGGER.debug("%s: Connecting; RSSI: %s", self.name, self.rssi) | ||
| client = await establish_connection( | ||
| BleakClientWithServiceCache, | ||
| self._ble_device, | ||
| self.name, | ||
| self._disconnected, | ||
| use_services_cache=True, | ||
| ble_device_callback=lambda: self._ble_device, | ||
| ) | ||
| _LOGGER.debug("%s: Connected; RSSI: %s", self.name, self.rssi) | ||
| resolved = self._resolve_characteristics(client.services) | ||
| if not resolved: | ||
| # Try to handle services failing to load | ||
| resolved = self._resolve_characteristics(await client.get_services()) | ||
| for attempt in range(2): | ||
| client = await establish_connection( | ||
| BleakClientWithServiceCache, | ||
| self._ble_device, | ||
| self.name, | ||
| self._disconnected, | ||
| use_services_cache=True, | ||
| ble_device_callback=lambda: self._ble_device, | ||
| ) | ||
| _LOGGER.debug("%s: Connected; RSSI: %s", self.name, self.rssi) | ||
| if self._resolve_characteristics(client.services): | ||
| # Supported characteristics found | ||
| break | ||
| else: | ||
| if attempt == 0: | ||
| # Try to handle services failing to load | ||
| await client.clear_cache() | ||
| await client.disconnect() | ||
| continue | ||
| await client.disconnect() | ||
| raise CharacteristicMissingError( | ||
| "Failed to find supported characteristics, device may not be supported" | ||
| ) | ||
@@ -428,3 +438,3 @@ self._client = client | ||
| if self.dream and self.preset_pattern_num == 0: | ||
| return f"Effect {self.mode+1}" | ||
| return f"Effect {self.mode + 1}" | ||
| return self._named_effect | ||
@@ -431,0 +441,0 @@ |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
50230
0.84%714
1.42%