HueBLE 2.2.2__tar.gz → 2.2.3__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.
- {hueble-2.2.2 → hueble-2.2.3}/HueBLE.egg-info/PKG-INFO +1 -1
- {hueble-2.2.2 → hueble-2.2.3}/HueBLE.py +7 -1
- {hueble-2.2.2 → hueble-2.2.3}/PKG-INFO +1 -1
- {hueble-2.2.2 → hueble-2.2.3}/pyproject.toml +1 -1
- {hueble-2.2.2 → hueble-2.2.3}/tests/test_HueBLE.py +23 -0
- {hueble-2.2.2 → hueble-2.2.3}/HueBLE.egg-info/SOURCES.txt +0 -0
- {hueble-2.2.2 → hueble-2.2.3}/HueBLE.egg-info/dependency_links.txt +0 -0
- {hueble-2.2.2 → hueble-2.2.3}/HueBLE.egg-info/requires.txt +0 -0
- {hueble-2.2.2 → hueble-2.2.3}/HueBLE.egg-info/top_level.txt +0 -0
- {hueble-2.2.2 → hueble-2.2.3}/LICENSE.txt +0 -0
- {hueble-2.2.2 → hueble-2.2.3}/README.md +0 -0
- {hueble-2.2.2 → hueble-2.2.3}/setup.cfg +0 -0
|
@@ -17,7 +17,6 @@ from struct import pack, unpack
|
|
|
17
17
|
from typing import Callable
|
|
18
18
|
from enum import Enum
|
|
19
19
|
|
|
20
|
-
|
|
21
20
|
#: String containing manufacturer. Handle 15.
|
|
22
21
|
UUID_MANUFACTURER = "00002a29-0000-1000-8000-00805f9b34fb"
|
|
23
22
|
|
|
@@ -148,6 +147,13 @@ class EffectType(Enum):
|
|
|
148
147
|
SUNBEAM = 0x10
|
|
149
148
|
ENCHANT = 0x11
|
|
150
149
|
|
|
150
|
+
@classmethod
|
|
151
|
+
def _missing_(cls, value):
|
|
152
|
+
_LOGGER.warning(
|
|
153
|
+
f"Unknown effect type: '{value}' reported by light, using default of none!"
|
|
154
|
+
)
|
|
155
|
+
return cls.NONE
|
|
156
|
+
|
|
151
157
|
|
|
152
158
|
#: EFFECT_COMMANDS (hex string) for the Effect Characteristic endpoint containing one byte id and one byte data length
|
|
153
159
|
class EffectCommands(Enum):
|
|
@@ -370,6 +370,29 @@ async def test_commands(
|
|
|
370
370
|
},
|
|
371
371
|
id="temperature_effect",
|
|
372
372
|
),
|
|
373
|
+
pytest.param(
|
|
374
|
+
{
|
|
375
|
+
HueBLE.UUID_MANUFACTURER: "Philippe Hue".encode(),
|
|
376
|
+
HueBLE.UUID_MODEL: "Fancy new light".encode(),
|
|
377
|
+
HueBLE.UUID_FW_VERSION: "1.7.10".encode(),
|
|
378
|
+
HueBLE.UUID_ZIGBEE_ADDRESS: bytes.fromhex("00010203040506070809"),
|
|
379
|
+
HueBLE.UUID_NAME: "L A M P".encode(),
|
|
380
|
+
HueBLE.UUID_EFFECTS: bytes.fromhex("01010102014503022c01060115080138"),
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"manufacturer": "Philippe Hue",
|
|
384
|
+
"model": "Fancy new light",
|
|
385
|
+
"firmware": "1.7.10",
|
|
386
|
+
"zigbee_address": "00:01:02:03:04:05:06:07:08:09",
|
|
387
|
+
"name_in_app": "L A M P",
|
|
388
|
+
"power_state": True,
|
|
389
|
+
"brightness": 69,
|
|
390
|
+
"colour_temp": 300,
|
|
391
|
+
"colour_xy": None,
|
|
392
|
+
"effect": (HueBLE.EffectType.NONE, 56),
|
|
393
|
+
},
|
|
394
|
+
id="unknown_effect",
|
|
395
|
+
),
|
|
373
396
|
],
|
|
374
397
|
)
|
|
375
398
|
async def test_poll_state(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|