pyezvizapi 1.0.3.4__py3-none-any.whl → 1.0.3.5__py3-none-any.whl

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.

Potentially problematic release.


This version of pyezvizapi might be problematic. Click here for more details.

pyezvizapi/feature.py CHANGED
@@ -287,6 +287,33 @@ def display_mode_value(camera_data: Mapping[str, Any]) -> int:
287
287
  return 1
288
288
 
289
289
 
290
+ def blc_current_value(camera_data: Mapping[str, Any]) -> int:
291
+ """Return BLC position (0..5) from camera data. 0 = Off."""
292
+ optionals = optionals_mapping(camera_data)
293
+ inverse_mode = optionals.get("inverse_mode")
294
+ inverse_mode = decode_json(inverse_mode)
295
+
296
+ # Expected: {"mode": int, "enable": 0|1, "position": 0..5}
297
+ if isinstance(inverse_mode, Mapping):
298
+ enable = inverse_mode.get("enable", 0)
299
+ position = inverse_mode.get("position", 0)
300
+ if (
301
+ isinstance(enable, int)
302
+ and enable == 1
303
+ and isinstance(position, int)
304
+ and position in (1, 2, 3, 4, 5)
305
+ ):
306
+ return position
307
+ return 0
308
+
309
+ # Fallbacks if backend ever returns a bare int (position) instead of the object
310
+ if isinstance(inverse_mode, int) and inverse_mode in (0, 1, 2, 3, 4, 5):
311
+ return inverse_mode
312
+
313
+ # Default to Off
314
+ return 0
315
+
316
+
290
317
  def device_icr_dss_config(camera_data: Mapping[str, Any]) -> dict[str, Any]:
291
318
  """Decode and return the device_ICR_DSS configuration."""
292
319
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyezvizapi
3
- Version: 1.0.3.4
3
+ Version: 1.0.3.5
4
4
  Summary: Pilot your Ezviz cameras
5
5
  Home-page: https://github.com/RenierM26/pyEzvizApi/
6
6
  Author: Renier Moorcroft
@@ -6,17 +6,17 @@ pyezvizapi/cas.py,sha256=3zHe-_a0KchCmGeAj1of-pV6oMPRUmSCIiDqBFsTK8A,6025
6
6
  pyezvizapi/client.py,sha256=rQ95oGgx16M69BWA8WTmmpyX9d4kHdxt6biVMrjDmOQ,140990
7
7
  pyezvizapi/constants.py,sha256=5AxJYfof6NvebBcFvPkoKI6xinpkwmCnaauUvhvBMDY,12810
8
8
  pyezvizapi/exceptions.py,sha256=8rmxEUQdrziqMe-M1SeeRd0HtP2IDQ2xpJVj7wvOQyo,976
9
- pyezvizapi/feature.py,sha256=kd6wx1s05Tjeu6x3kOpDWyG34JI4sICjtUgA1yqfurA,13763
9
+ pyezvizapi/feature.py,sha256=0cVUPmFge5qa70yblBJ-DVXagLxrI2Vg_21d_nj1Rt8,14680
10
10
  pyezvizapi/light_bulb.py,sha256=9wgycG3dTvBbrsxQjQnXal-GA8VXPsIN1m-CTtRh8i0,7797
11
11
  pyezvizapi/models.py,sha256=NQzwTP0yEe2IWU-Vc6nAn87xulpTuo0MX2Rcf0WxifA,4176
12
12
  pyezvizapi/mqtt.py,sha256=aOL-gexZgYvCCaNQ03M4vZan91d5p2Fl_qsFykn9NW4,22365
13
13
  pyezvizapi/test_cam_rtsp.py,sha256=O9NHh-vcNFfnzNw8jbuhM9a_5TWfNZIMXaJP7Lmkaj4,5162
14
14
  pyezvizapi/test_mqtt.py,sha256=Orn-fwZPJIE4G5KROMX0MRAkLwU6nLb9LUtXyb2ZCQs,4147
15
15
  pyezvizapi/utils.py,sha256=ozGncEyaIJJ8VYw8f-xfM2OBmqR8eNYLq728FFvbvr8,12757
16
- pyezvizapi-1.0.3.4.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
17
- pyezvizapi-1.0.3.4.dist-info/licenses/LICENSE.md,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
18
- pyezvizapi-1.0.3.4.dist-info/METADATA,sha256=TwtWVfThbChaFcsqX97ybBjgAnpRBje6cJX43GiIe9g,695
19
- pyezvizapi-1.0.3.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
- pyezvizapi-1.0.3.4.dist-info/entry_points.txt,sha256=_BSJ3eNb2H_AZkRdsv1s4mojqWn3N7m503ujvg1SudA,56
21
- pyezvizapi-1.0.3.4.dist-info/top_level.txt,sha256=gMZTelIi8z7pXyTCQLLaIkxVRrDQ_lS2NEv0WgfHrHs,11
22
- pyezvizapi-1.0.3.4.dist-info/RECORD,,
16
+ pyezvizapi-1.0.3.5.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
17
+ pyezvizapi-1.0.3.5.dist-info/licenses/LICENSE.md,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
18
+ pyezvizapi-1.0.3.5.dist-info/METADATA,sha256=nskhuwQbsfgTbcDlJChcWsktleT3pRUdNvBlCHPQbk0,695
19
+ pyezvizapi-1.0.3.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
+ pyezvizapi-1.0.3.5.dist-info/entry_points.txt,sha256=_BSJ3eNb2H_AZkRdsv1s4mojqWn3N7m503ujvg1SudA,56
21
+ pyezvizapi-1.0.3.5.dist-info/top_level.txt,sha256=gMZTelIi8z7pXyTCQLLaIkxVRrDQ_lS2NEv0WgfHrHs,11
22
+ pyezvizapi-1.0.3.5.dist-info/RECORD,,