pyimouapi 1.2.1__tar.gz → 1.2.2__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.
- {pyimouapi-1.2.1 → pyimouapi-1.2.2}/PKG-INFO +1 -1
- {pyimouapi-1.2.1 → pyimouapi-1.2.2}/pyimouapi/const.py +10 -1
- {pyimouapi-1.2.1 → pyimouapi-1.2.2}/pyimouapi/device.py +6 -1
- {pyimouapi-1.2.1 → pyimouapi-1.2.2}/pyimouapi/ha_device.py +2 -2
- {pyimouapi-1.2.1 → pyimouapi-1.2.2}/pyimouapi.egg-info/PKG-INFO +1 -1
- {pyimouapi-1.2.1 → pyimouapi-1.2.2}/setup.py +1 -1
- {pyimouapi-1.2.1 → pyimouapi-1.2.2}/LICENSE +0 -0
- {pyimouapi-1.2.1 → pyimouapi-1.2.2}/README.md +0 -0
- {pyimouapi-1.2.1 → pyimouapi-1.2.2}/pyimouapi/__init__.py +0 -0
- {pyimouapi-1.2.1 → pyimouapi-1.2.2}/pyimouapi/exceptions.py +0 -0
- {pyimouapi-1.2.1 → pyimouapi-1.2.2}/pyimouapi/openapi.py +0 -0
- {pyimouapi-1.2.1 → pyimouapi-1.2.2}/pyimouapi.egg-info/SOURCES.txt +0 -0
- {pyimouapi-1.2.1 → pyimouapi-1.2.2}/pyimouapi.egg-info/dependency_links.txt +0 -0
- {pyimouapi-1.2.1 → pyimouapi-1.2.2}/pyimouapi.egg-info/top_level.txt +0 -0
- {pyimouapi-1.2.1 → pyimouapi-1.2.2}/setup.cfg +0 -0
|
@@ -493,7 +493,7 @@ TEXT_TYPE_REF = {
|
|
|
493
493
|
"default": "100",
|
|
494
494
|
"ref_type": "properties",
|
|
495
495
|
"value_type": "int",
|
|
496
|
-
}
|
|
496
|
+
},
|
|
497
497
|
],
|
|
498
498
|
}
|
|
499
499
|
|
|
@@ -503,3 +503,12 @@ BUTTON_TYPE_PARAM_VALUE = {
|
|
|
503
503
|
"ptz_left": 2,
|
|
504
504
|
"ptz_right": 3,
|
|
505
505
|
}
|
|
506
|
+
|
|
507
|
+
NIGHT_VISION_MODE_MAP = {
|
|
508
|
+
"intelligent": "Intelligent",
|
|
509
|
+
"fullcolor": "FullColor",
|
|
510
|
+
"infrared": "Infrared",
|
|
511
|
+
"off": "Off",
|
|
512
|
+
"lowlight": "LowLight",
|
|
513
|
+
"smartlowlight": "SmartLowLight"
|
|
514
|
+
}
|
|
@@ -52,7 +52,10 @@ from .const import (
|
|
|
52
52
|
API_ENDPOINT_GET_IOT_DEVICE_DETAIL_INFO,
|
|
53
53
|
PARAM_ABILITY_REFS,
|
|
54
54
|
PARAM_CHANNELS,
|
|
55
|
-
PARAM_ACCESS_TYPE,
|
|
55
|
+
PARAM_ACCESS_TYPE,
|
|
56
|
+
API_ENDPOINT_WAKE_UP_DEVICE,
|
|
57
|
+
PARAM_URL,
|
|
58
|
+
NIGHT_VISION_MODE_MAP,
|
|
56
59
|
)
|
|
57
60
|
from .openapi import ImouOpenApiClient
|
|
58
61
|
|
|
@@ -357,6 +360,8 @@ class ImouDeviceManager:
|
|
|
357
360
|
self, device_id: str, channel_id: str, night_vision_mode: str
|
|
358
361
|
) -> None:
|
|
359
362
|
"""set device night vision mode"""
|
|
363
|
+
if night_vision_mode in NIGHT_VISION_MODE_MAP:
|
|
364
|
+
night_vision_mode = NIGHT_VISION_MODE_MAP[night_vision_mode]
|
|
360
365
|
params = {
|
|
361
366
|
PARAM_DEVICE_ID: device_id,
|
|
362
367
|
PARAM_CHANNEL_ID: channel_id,
|
|
@@ -578,9 +578,9 @@ class ImouHaDeviceManager(object):
|
|
|
578
578
|
if data[PARAM_MODE] is not None:
|
|
579
579
|
device.selects[PARAM_NIGHT_VISION_MODE][PARAM_CURRENT_OPTION] = data[
|
|
580
580
|
PARAM_MODE
|
|
581
|
-
]
|
|
581
|
+
].lower()
|
|
582
582
|
if data[PARAM_MODES] is not None:
|
|
583
|
-
device.selects[PARAM_NIGHT_VISION_MODE][PARAM_OPTIONS] = data[PARAM_MODES]
|
|
583
|
+
device.selects[PARAM_NIGHT_VISION_MODE][PARAM_OPTIONS] = [item.lower() for item in data[PARAM_MODES]]
|
|
584
584
|
|
|
585
585
|
@staticmethod
|
|
586
586
|
def configure_device_by_ability(
|
|
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
|