python-ember-mug 1.3.0b6__tar.gz → 1.3.0b7__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.0b6 → python_ember_mug-1.3.0b7}/PKG-INFO +1 -1
- {python_ember_mug-1.3.0b6 → python_ember_mug-1.3.0b7}/ember_mug/__init__.py +1 -1
- {python_ember_mug-1.3.0b6 → python_ember_mug-1.3.0b7}/ember_mug/mug.py +1 -1
- {python_ember_mug-1.3.0b6 → python_ember_mug-1.3.0b7}/ember_mug/utils.py +5 -5
- {python_ember_mug-1.3.0b6 → python_ember_mug-1.3.0b7}/.gitignore +0 -0
- {python_ember_mug-1.3.0b6 → python_ember_mug-1.3.0b7}/LICENSE +0 -0
- {python_ember_mug-1.3.0b6 → python_ember_mug-1.3.0b7}/README.md +0 -0
- {python_ember_mug-1.3.0b6 → python_ember_mug-1.3.0b7}/ember_mug/__main__.py +0 -0
- {python_ember_mug-1.3.0b6 → python_ember_mug-1.3.0b7}/ember_mug/cli/__init__.py +0 -0
- {python_ember_mug-1.3.0b6 → python_ember_mug-1.3.0b7}/ember_mug/cli/commands.py +0 -0
- {python_ember_mug-1.3.0b6 → python_ember_mug-1.3.0b7}/ember_mug/cli/helpers.py +0 -0
- {python_ember_mug-1.3.0b6 → python_ember_mug-1.3.0b7}/ember_mug/consts.py +0 -0
- {python_ember_mug-1.3.0b6 → python_ember_mug-1.3.0b7}/ember_mug/data.py +0 -0
- {python_ember_mug-1.3.0b6 → python_ember_mug-1.3.0b7}/ember_mug/formatting.py +0 -0
- {python_ember_mug-1.3.0b6 → python_ember_mug-1.3.0b7}/ember_mug/scanner.py +0 -0
- {python_ember_mug-1.3.0b6 → python_ember_mug-1.3.0b7}/pyproject.toml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-ember-mug
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.0b7
|
|
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/
|
|
@@ -313,7 +313,7 @@ class EmberMug:
|
|
|
313
313
|
unit = TemperatureUnit.FAHRENHEIT if self.data.use_metric is False else TemperatureUnit.CELSIUS
|
|
314
314
|
min_temp, max_temp = MIN_MAX_TEMPS[unit]
|
|
315
315
|
if target_temp != 0 and not (min_temp <= target_temp <= max_temp):
|
|
316
|
-
raise ValueError(f"Temperature
|
|
316
|
+
raise ValueError(f"Temperature '{target_temp}' is not between {min_temp} and {max_temp} or 0.")
|
|
317
317
|
|
|
318
318
|
target_temp = self._convert_to_device_unit(target_temp)
|
|
319
319
|
target = bytearray(round(target_temp / 0.01).to_bytes(2, "little"))
|
|
@@ -67,13 +67,13 @@ def get_colour_from_int(colour_id: int) -> DeviceColour | None: # noqa: PLR0911
|
|
|
67
67
|
return DeviceColour.BLACK
|
|
68
68
|
if colour_id in (-126, -62, 2):
|
|
69
69
|
return DeviceColour.WHITE
|
|
70
|
-
if colour_id in (
|
|
70
|
+
if colour_id in (-120, -117, -63, -56, -53, 8, 11):
|
|
71
71
|
return DeviceColour.RED
|
|
72
|
-
if colour_id in (-131, -125, -61, 3, 83):
|
|
72
|
+
if colour_id in (-131, -125, -61, 3, 51, 83):
|
|
73
73
|
return DeviceColour.COPPER
|
|
74
74
|
if colour_id in (-124, -60):
|
|
75
75
|
return DeviceColour.ROSE_GOLD
|
|
76
|
-
if colour_id in (-
|
|
76
|
+
if colour_id in (-123, -59):
|
|
77
77
|
return DeviceColour.STAINLESS_STEEL
|
|
78
78
|
return {
|
|
79
79
|
-51: DeviceColour.SANDSTONE,
|
|
@@ -95,7 +95,7 @@ def get_model_from_single_int_and_services( # noqa PLR0911
|
|
|
95
95
|
return DeviceModel.MUG_1_10_OZ
|
|
96
96
|
if model_id == 65:
|
|
97
97
|
return DeviceModel.MUG_1_14_OZ
|
|
98
|
-
if model_id in (-51, -59, -63, -61, -62):
|
|
98
|
+
if model_id in (-51, -59, -63, -61, -62, 120):
|
|
99
99
|
return DeviceModel.MUG_2_14_OZ
|
|
100
100
|
if model_id == -60:
|
|
101
101
|
return DeviceModel.CUP_6_OZ
|
|
@@ -108,7 +108,7 @@ def get_model_from_id_and_gen(model_id: int, generation: int) -> DeviceModel | N
|
|
|
108
108
|
"""Extract model from identifier in advertiser data."""
|
|
109
109
|
if model_id == 1:
|
|
110
110
|
return DeviceModel.MUG_1_10_OZ if generation < 2 else DeviceModel.MUG_2_10_OZ
|
|
111
|
-
if model_id
|
|
111
|
+
if model_id in (2, 120):
|
|
112
112
|
return DeviceModel.MUG_1_14_OZ if generation < 2 else DeviceModel.MUG_2_14_OZ
|
|
113
113
|
if model_id == 3:
|
|
114
114
|
return DeviceModel.TRAVEL_MUG_12_OZ
|
|
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
|
|
File without changes
|