python-ember-mug 1.3.3__tar.gz → 1.4.0b1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_ember_mug-1.3.3 → python_ember_mug-1.4.0b1}/PKG-INFO +2 -2
- {python_ember_mug-1.3.3 → python_ember_mug-1.4.0b1}/ember_mug/__init__.py +1 -1
- {python_ember_mug-1.3.3 → python_ember_mug-1.4.0b1}/ember_mug/cli/commands.py +2 -1
- {python_ember_mug-1.3.3 → python_ember_mug-1.4.0b1}/ember_mug/data.py +1 -1
- {python_ember_mug-1.3.3 → python_ember_mug-1.4.0b1}/ember_mug/mug.py +3 -3
- {python_ember_mug-1.3.3 → python_ember_mug-1.4.0b1}/pyproject.toml +3 -2
- {python_ember_mug-1.3.3 → python_ember_mug-1.4.0b1}/.gitignore +0 -0
- {python_ember_mug-1.3.3 → python_ember_mug-1.4.0b1}/LICENSE +0 -0
- {python_ember_mug-1.3.3 → python_ember_mug-1.4.0b1}/README.md +0 -0
- {python_ember_mug-1.3.3 → python_ember_mug-1.4.0b1}/ember_mug/__main__.py +0 -0
- {python_ember_mug-1.3.3 → python_ember_mug-1.4.0b1}/ember_mug/cli/__init__.py +0 -0
- {python_ember_mug-1.3.3 → python_ember_mug-1.4.0b1}/ember_mug/cli/helpers.py +0 -0
- {python_ember_mug-1.3.3 → python_ember_mug-1.4.0b1}/ember_mug/consts.py +0 -0
- {python_ember_mug-1.3.3 → python_ember_mug-1.4.0b1}/ember_mug/formatting.py +0 -0
- {python_ember_mug-1.3.3 → python_ember_mug-1.4.0b1}/ember_mug/py.typed +0 -0
- {python_ember_mug-1.3.3 → python_ember_mug-1.4.0b1}/ember_mug/scanner.py +0 -0
- {python_ember_mug-1.3.3 → python_ember_mug-1.4.0b1}/ember_mug/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-ember-mug
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.0b1
|
|
4
4
|
Summary: Python Library for Ember Mugs.
|
|
5
5
|
Project-URL: Changelog, https://sopelj.github.io/python-ember-mug/changelog/
|
|
6
6
|
Project-URL: Documentation, https://sopelj.github.io/python-ember-mug/
|
|
@@ -19,7 +19,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.14
|
|
20
20
|
Requires-Python: >=3.11
|
|
21
21
|
Requires-Dist: bleak-retry-connector>=4.0.2
|
|
22
|
-
Requires-Dist: bleak
|
|
22
|
+
Requires-Dist: bleak>=1.0.1
|
|
23
23
|
Provides-Extra: dev
|
|
24
24
|
Requires-Dist: ipython; extra == 'dev'
|
|
25
25
|
Provides-Extra: docs
|
|
@@ -10,7 +10,7 @@ import sys
|
|
|
10
10
|
from argparse import ArgumentParser, ArgumentTypeError, FileType, Namespace
|
|
11
11
|
from typing import TYPE_CHECKING, ClassVar
|
|
12
12
|
|
|
13
|
-
from bleak import
|
|
13
|
+
from bleak import BleakError
|
|
14
14
|
|
|
15
15
|
from ember_mug.consts import ATTR_LABELS, EMBER_BLE_SIG, EXTRA_ATTRS, IS_LINUX, TESTING_BLE_SIG, VolumeLevel
|
|
16
16
|
from ember_mug.data import Colour, DeviceModel
|
|
@@ -25,6 +25,7 @@ from .helpers import CommandLoop, print_changes, print_info, print_table, valida
|
|
|
25
25
|
if TYPE_CHECKING:
|
|
26
26
|
from collections.abc import Awaitable, Callable
|
|
27
27
|
|
|
28
|
+
from bleak import AdvertisementData
|
|
28
29
|
from bleak.backends.device import BLEDevice
|
|
29
30
|
|
|
30
31
|
all_attrs = list(ATTR_LABELS) + list(EXTRA_ATTRS)
|
|
@@ -266,11 +266,11 @@ class EmberMug:
|
|
|
266
266
|
|
|
267
267
|
async def get_meta(self) -> MugMeta:
|
|
268
268
|
"""Fetch Meta info from the mug (Serial number and ID)."""
|
|
269
|
-
return MugMeta.from_bytes(await self._read(MugCharacteristic.MUG_ID))
|
|
269
|
+
return MugMeta.from_bytes(bytes(await self._read(MugCharacteristic.MUG_ID)))
|
|
270
270
|
|
|
271
271
|
async def get_battery(self) -> BatteryInfo:
|
|
272
272
|
"""Get Battery percent from mug gatt."""
|
|
273
|
-
return BatteryInfo.from_bytes(await self._read(MugCharacteristic.BATTERY))
|
|
273
|
+
return BatteryInfo.from_bytes(bytes(await self._read(MugCharacteristic.BATTERY)))
|
|
274
274
|
|
|
275
275
|
async def make_writable(self) -> bool:
|
|
276
276
|
"""Try to make device writable if need be."""
|
|
@@ -419,7 +419,7 @@ class EmberMug:
|
|
|
419
419
|
|
|
420
420
|
async def get_firmware(self) -> MugFirmwareInfo:
|
|
421
421
|
"""Get firmware info."""
|
|
422
|
-
return MugFirmwareInfo.from_bytes(await self._read(MugCharacteristic.FIRMWARE))
|
|
422
|
+
return MugFirmwareInfo.from_bytes(bytes(await self._read(MugCharacteristic.FIRMWARE)))
|
|
423
423
|
|
|
424
424
|
async def update_initial(self) -> list[Change]:
|
|
425
425
|
"""Update attributes that don't normally change and don't need to be regularly updated."""
|
|
@@ -18,7 +18,7 @@ classifiers = [
|
|
|
18
18
|
]
|
|
19
19
|
dependencies = [
|
|
20
20
|
"bleak-retry-connector>=4.0.2",
|
|
21
|
-
"bleak>=1.0.1
|
|
21
|
+
"bleak>=1.0.1",
|
|
22
22
|
]
|
|
23
23
|
|
|
24
24
|
[project.optional-dependencies]
|
|
@@ -76,13 +76,14 @@ features = ["test"]
|
|
|
76
76
|
|
|
77
77
|
[[tool.hatch.envs.test.matrix]]
|
|
78
78
|
python = ["3.11", "3.12", "3.13", "3.14"]
|
|
79
|
+
bleak = ["1.0.1", "2.0.0", "3.0.2"]
|
|
79
80
|
|
|
80
81
|
[tool.hatch.envs.test.scripts]
|
|
81
82
|
cov = "pytest -vvv --asyncio-mode=auto --cov=ember_mug --cov-branch --cov-report=xml --cov-report=term-missing tests"
|
|
82
83
|
no-cov = "cov --no-cov"
|
|
83
84
|
|
|
84
85
|
[tool.hatch.envs.docs]
|
|
85
|
-
python = "3.
|
|
86
|
+
python = "3.14"
|
|
86
87
|
features = ["docs"]
|
|
87
88
|
|
|
88
89
|
[tool.hatch.envs.docs.scripts]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|