pyimouapi 1.3.4__tar.gz → 1.3.5__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.3.4 → pyimouapi-1.3.5}/PKG-INFO +1 -1
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/pyimouapi/__init__.py +1 -1
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/pyimouapi/const.py +22 -11
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/pyimouapi/device.py +778 -723
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/pyimouapi/exceptions.py +2 -0
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/pyimouapi/ha_device.py +464 -390
- pyimouapi-1.3.5/pyimouapi/openapi.py +290 -0
- pyimouapi-1.3.5/pyimouapi/py.typed +0 -0
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/pyimouapi.egg-info/PKG-INFO +1 -1
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/pyimouapi.egg-info/SOURCES.txt +17 -0
- pyimouapi-1.3.5/pyimouapi.egg-info/not-zip-safe +1 -0
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/pyproject.toml +16 -1
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/setup.py +3 -1
- pyimouapi-1.3.5/tests/test_accessory_device_id.py +73 -0
- pyimouapi-1.3.5/tests/test_auth_failure_propagates.py +142 -0
- pyimouapi-1.3.5/tests/test_bind_device.py +37 -0
- pyimouapi-1.3.5/tests/test_connection_pool.py +94 -0
- pyimouapi-1.3.5/tests/test_device_image.py +61 -0
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/tests/test_device_summaries.py +29 -0
- pyimouapi-1.3.5/tests/test_entity_tables_golden.py +36 -0
- pyimouapi-1.3.5/tests/test_get_devices.py +170 -0
- pyimouapi-1.3.5/tests/test_motion_detect_excepts.py +91 -0
- pyimouapi-1.3.5/tests/test_openapi_http.py +490 -0
- pyimouapi-1.3.5/tests/test_packaging.py +37 -0
- pyimouapi-1.3.5/tests/test_product_id_guard.py +45 -0
- pyimouapi-1.3.5/tests/test_services_entities_concurrency.py +123 -0
- pyimouapi-1.3.5/tests/test_set_text_value.py +85 -0
- pyimouapi-1.3.5/tests/test_status_read_concurrency.py +156 -0
- pyimouapi-1.3.5/tests/test_switch_status_aggregation.py +110 -0
- pyimouapi-1.3.4/pyimouapi/openapi.py +0 -165
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/LICENSE +0 -0
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/README.md +0 -0
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/pyimouapi/collection_point.py +0 -0
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/pyimouapi/select_option.py +0 -0
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/pyimouapi/sensor.py +0 -0
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/pyimouapi/siren.py +0 -0
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/pyimouapi.egg-info/dependency_links.txt +0 -0
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/pyimouapi.egg-info/requires.txt +0 -0
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/pyimouapi.egg-info/top_level.txt +0 -0
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/setup.cfg +0 -0
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/tests/test_channel_id_and_api_guards.py +0 -0
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/tests/test_collect_property_entities.py +0 -0
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/tests/test_collection_point.py +0 -0
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/tests/test_event_identifier_map.py +0 -0
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/tests/test_lookup_property.py +0 -0
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/tests/test_message_callback.py +0 -0
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/tests/test_select_option.py +0 -0
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/tests/test_sensor_normalize.py +0 -0
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/tests/test_siren.py +0 -0
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/tests/test_update_from_detail.py +0 -0
- {pyimouapi-1.3.4 → pyimouapi-1.3.5}/tests/test_write_optimistic_state.py +0 -0
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Any
|
|
2
|
+
|
|
1
3
|
# API Endpoints
|
|
2
4
|
API_ENDPOINT_ACCESS_TOKEN = "/openapi/accessToken"
|
|
3
5
|
API_ENDPOINT_LIST_DEVICE_DETAILS = "/openapi/listDeviceDetailsByPage"
|
|
@@ -10,6 +12,7 @@ API_ENDPOINT_GET_DEVICE_NIGHT_VISION_MODE = "/openapi/getNightVisionMode"
|
|
|
10
12
|
API_ENDPOINT_SET_DEVICE_NIGHT_VISION_MODE = "/openapi/setNightVisionMode"
|
|
11
13
|
API_ENDPOINT_DEVICE_STORAGE = "/openapi/deviceStorage"
|
|
12
14
|
API_ENDPOINT_RESTART_DEVICE = "/openapi/restartDevice"
|
|
15
|
+
API_ENDPOINT_BIND_DEVICE = "/openapi/bindDevice"
|
|
13
16
|
API_ENDPOINT_BIND_DEVICE_LIVE = "/openapi/bindDeviceLive"
|
|
14
17
|
API_ENDPOINT_GET_DEVICE_ONLINE = "/openapi/deviceOnline"
|
|
15
18
|
API_ENDPOINT_GET_DEVICE_LIVE_INFO = "/openapi/getLiveStreamInfo"
|
|
@@ -155,7 +158,7 @@ PARAM_ABILITY = "ability"
|
|
|
155
158
|
PARAM_FUNCTION_TYPE = "function_type"
|
|
156
159
|
|
|
157
160
|
# Required capacity for various switch types
|
|
158
|
-
SWITCH_TYPE_ABILITY = {
|
|
161
|
+
SWITCH_TYPE_ABILITY: dict[str, list[dict[str, Any]]] = {
|
|
159
162
|
"motion_detect": [
|
|
160
163
|
{
|
|
161
164
|
"ability": "MobileDetect",
|
|
@@ -226,15 +229,21 @@ SWITCH_TYPE_ABILITY = {
|
|
|
226
229
|
],
|
|
227
230
|
}
|
|
228
231
|
|
|
229
|
-
SWITCH_TYPE_REF = {
|
|
232
|
+
SWITCH_TYPE_REF: dict[str, list[dict[str, Any]]] = {
|
|
230
233
|
"motion_detect": [
|
|
231
234
|
{
|
|
232
235
|
"ref": "14800",
|
|
233
236
|
"default": False,
|
|
237
|
+
"excepts": [
|
|
238
|
+
"FKX9UYL4",
|
|
239
|
+
],
|
|
234
240
|
},
|
|
235
241
|
{
|
|
236
242
|
"ref": "305000",
|
|
237
243
|
"default": False,
|
|
244
|
+
"excepts": [
|
|
245
|
+
"FKX9UYL4",
|
|
246
|
+
],
|
|
238
247
|
},
|
|
239
248
|
{
|
|
240
249
|
"ref": "108800",
|
|
@@ -313,7 +322,7 @@ SWITCH_TYPE_REF = {
|
|
|
313
322
|
],
|
|
314
323
|
}
|
|
315
324
|
# Required capacity for various button types
|
|
316
|
-
BUTTON_TYPE_ABILITY = {
|
|
325
|
+
BUTTON_TYPE_ABILITY: dict[str, list[str]] = {
|
|
317
326
|
"restart_device": ["Reboot"],
|
|
318
327
|
"siren_start": ["Siren"],
|
|
319
328
|
"siren_stop": ["Siren"],
|
|
@@ -322,7 +331,7 @@ BUTTON_TYPE_ABILITY = {
|
|
|
322
331
|
"ptz_left": ["PT", "PTZ"],
|
|
323
332
|
"ptz_right": ["PT", "PTZ"],
|
|
324
333
|
}
|
|
325
|
-
BUTTON_TYPE_REF = {
|
|
334
|
+
BUTTON_TYPE_REF: dict[str, list[dict[str, Any]]] = {
|
|
326
335
|
"restart_device": [
|
|
327
336
|
{"ref": "2300"},
|
|
328
337
|
{"ref": "21200"},
|
|
@@ -401,11 +410,11 @@ BUTTON_TYPE_REF = {
|
|
|
401
410
|
],
|
|
402
411
|
}
|
|
403
412
|
# Required capacity for various select types
|
|
404
|
-
SELECT_TYPE_ABILITY = {
|
|
413
|
+
SELECT_TYPE_ABILITY: dict[str, list[str]] = {
|
|
405
414
|
"night_vision_mode": ["NVM"],
|
|
406
415
|
"collection_point": ["CollectionPoint"],
|
|
407
416
|
}
|
|
408
|
-
SELECT_TYPE_REF = {
|
|
417
|
+
SELECT_TYPE_REF: dict[str, list[dict[str, Any]]] = {
|
|
409
418
|
"night_vision_mode": [
|
|
410
419
|
{
|
|
411
420
|
"ref": "17400",
|
|
@@ -460,11 +469,11 @@ SELECT_TYPE_REF = {
|
|
|
460
469
|
],
|
|
461
470
|
}
|
|
462
471
|
# Required capacity for various sensor types
|
|
463
|
-
SENSOR_TYPE_ABILITY = {
|
|
472
|
+
SENSOR_TYPE_ABILITY: dict[str, list[str]] = {
|
|
464
473
|
"storage_used": ["LocalStorage", "LocalStorageEnable"],
|
|
465
474
|
"battery": ["Electric"],
|
|
466
475
|
}
|
|
467
|
-
SENSOR_TYPE_REF = {
|
|
476
|
+
SENSOR_TYPE_REF: dict[str, list[dict[str, Any]]] = {
|
|
468
477
|
"storage_used": [
|
|
469
478
|
{
|
|
470
479
|
"ref": "14600",
|
|
@@ -536,10 +545,12 @@ SENSOR_TYPE_REF = {
|
|
|
536
545
|
],
|
|
537
546
|
}
|
|
538
547
|
|
|
539
|
-
BINARY_SENSOR_TYPE_ABILITY = {}
|
|
540
|
-
BINARY_SENSOR_TYPE_REF
|
|
548
|
+
BINARY_SENSOR_TYPE_ABILITY: dict[str, list[str]] = {}
|
|
549
|
+
BINARY_SENSOR_TYPE_REF: dict[str, list[dict[str, Any]]] = {
|
|
550
|
+
"door_contact_status": [{"ref": "16300", "default": False}]
|
|
551
|
+
}
|
|
541
552
|
|
|
542
|
-
TEXT_TYPE_REF = {
|
|
553
|
+
TEXT_TYPE_REF: dict[str, list[dict[str, Any]]] = {
|
|
543
554
|
"count_down_switch": [
|
|
544
555
|
{
|
|
545
556
|
"ref": "28800",
|