pyimouapi 1.2.0__tar.gz → 1.2.1__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.0 → pyimouapi-1.2.1}/PKG-INFO +1 -1
- {pyimouapi-1.2.0 → pyimouapi-1.2.1}/pyimouapi/const.py +1 -1
- {pyimouapi-1.2.0 → pyimouapi-1.2.1}/pyimouapi/ha_device.py +10 -2
- {pyimouapi-1.2.0 → pyimouapi-1.2.1}/pyimouapi.egg-info/PKG-INFO +1 -1
- {pyimouapi-1.2.0 → pyimouapi-1.2.1}/setup.py +1 -1
- {pyimouapi-1.2.0 → pyimouapi-1.2.1}/LICENSE +0 -0
- {pyimouapi-1.2.0 → pyimouapi-1.2.1}/README.md +0 -0
- {pyimouapi-1.2.0 → pyimouapi-1.2.1}/pyimouapi/__init__.py +0 -0
- {pyimouapi-1.2.0 → pyimouapi-1.2.1}/pyimouapi/device.py +0 -0
- {pyimouapi-1.2.0 → pyimouapi-1.2.1}/pyimouapi/exceptions.py +0 -0
- {pyimouapi-1.2.0 → pyimouapi-1.2.1}/pyimouapi/openapi.py +0 -0
- {pyimouapi-1.2.0 → pyimouapi-1.2.1}/pyimouapi.egg-info/SOURCES.txt +0 -0
- {pyimouapi-1.2.0 → pyimouapi-1.2.1}/pyimouapi.egg-info/dependency_links.txt +0 -0
- {pyimouapi-1.2.0 → pyimouapi-1.2.1}/pyimouapi.egg-info/top_level.txt +0 -0
- {pyimouapi-1.2.0 → pyimouapi-1.2.1}/setup.cfg +0 -0
|
@@ -526,6 +526,9 @@ class ImouHaDeviceManager(object):
|
|
|
526
526
|
if device.selects[select_type].get(PARAM_REF):
|
|
527
527
|
ref_id = device.selects[select_type].get(PARAM_REF)
|
|
528
528
|
value_type = device.selects[select_type].get(PARAM_VALUE_TYPE)
|
|
529
|
+
# 兼容下音量15400值为-1的情况
|
|
530
|
+
if ref_id == "15400" and option == "99":
|
|
531
|
+
option = "-1"
|
|
529
532
|
await self._async_select_option_by_ref(device, option, ref_id, value_type)
|
|
530
533
|
elif PARAM_NIGHT_VISION_MODE == select_type:
|
|
531
534
|
await self.delegate.async_set_device_night_vision_mode(
|
|
@@ -964,7 +967,7 @@ class ImouHaDeviceManager(object):
|
|
|
964
967
|
)
|
|
965
968
|
if ref in data[PARAM_PROPERTIES]:
|
|
966
969
|
device.switches[switch_type][PARAM_STATE] = (
|
|
967
|
-
|
|
970
|
+
data[PARAM_PROPERTIES][ref] == 1
|
|
968
971
|
)
|
|
969
972
|
except Exception as e:
|
|
970
973
|
_LOGGER.error(f"_async_update_device_switch_status_by_ref fail:{e}")
|
|
@@ -986,11 +989,16 @@ class ImouHaDeviceManager(object):
|
|
|
986
989
|
device_id, device.channel_id, device.product_id, [ref]
|
|
987
990
|
)
|
|
988
991
|
if ref in data[PARAM_PROPERTIES]:
|
|
989
|
-
|
|
992
|
+
value=(
|
|
990
993
|
str(data[PARAM_PROPERTIES][ref])
|
|
991
994
|
if isinstance(data[PARAM_PROPERTIES][ref], int)
|
|
992
995
|
else data[PARAM_PROPERTIES][ref]
|
|
993
996
|
)
|
|
997
|
+
device.selects[select_type][PARAM_CURRENT_OPTION] = value
|
|
998
|
+
# 兼容音量值为-1的情况
|
|
999
|
+
if ref == "15400" and value == "-1":
|
|
1000
|
+
device.selects[select_type][PARAM_CURRENT_OPTION] = "99"
|
|
1001
|
+
|
|
994
1002
|
except Exception as e:
|
|
995
1003
|
_LOGGER.error(f"Error while updating device select status: {e}")
|
|
996
1004
|
|
|
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
|