pyg90alarm 2.5.0__py3-none-any.whl → 2.5.2__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.
pyg90alarm/__init__.py CHANGED
@@ -53,6 +53,7 @@ from .local.alarm_phones import G90AlarmPhones
53
53
  from .local.net_config import G90NetConfig, G90APNAuth
54
54
  from .local.history import G90History
55
55
 
56
+ from .dataclass.load_save import DataclassLoadSave
56
57
  from .dataclass.validation import (
57
58
  get_field_validation_constraints,
58
59
  )
@@ -101,4 +102,6 @@ __all__ = [
101
102
  'G90History',
102
103
  # Dataclass validation
103
104
  'get_field_validation_constraints',
105
+ # Dataclass load/save
106
+ 'DataclassLoadSave',
104
107
  ]
@@ -68,6 +68,7 @@ class G90BaseList(Generic[T], ABC):
68
68
 
69
69
  :return: Async generator of entities
70
70
  """
71
+ # Placeholder to satisfy the abstractmethod
71
72
  yield cast(T, None) # pragma: no cover
72
73
 
73
74
  @property
@@ -118,7 +119,11 @@ class G90BaseList(Generic[T], ABC):
118
119
  )
119
120
 
120
121
  existing_entity.update(entity)
121
- non_existing_entities.remove(existing_entity)
122
+ # The entity might have already been removed if there
123
+ # are duplicate entities from the `_fetch` method,
124
+ # protect against that
125
+ if existing_entity in non_existing_entities:
126
+ non_existing_entities.remove(existing_entity)
122
127
 
123
128
  # Invoke the list change callback for the existing
124
129
  # entity to notify about the update
pyg90alarm/exceptions.py CHANGED
@@ -32,7 +32,7 @@ class G90Error(Exception):
32
32
  """
33
33
 
34
34
 
35
- class G90TimeoutError(asyncio.TimeoutError): # pylint:disable=R0903
35
+ class G90TimeoutError(asyncio.TimeoutError, G90Error):
36
36
  """
37
37
  Raised when particular package class to report an operation (typically
38
38
  device command) has timed out.
@@ -35,6 +35,7 @@ class G90SpeechLanguage(IntEnum):
35
35
  """
36
36
  Supported speech languages.
37
37
  """
38
+ NONE = 0 # Some panels send the value, exact meaning is unknown
38
39
  ENGLISH_FEMALE = 1
39
40
  ENGLISH_MALE = 2
40
41
  CHINESE_FEMALE = 3
@@ -73,7 +73,7 @@ class G90NetConfig(DataclassLoadSave):
73
73
  # Access Point Name (APN) for GPRS connection, as provided by the cellular
74
74
  # operator
75
75
  apn_name: str = validated_string_field(
76
- min_length=1, max_length=100, trust_initial_value=True
76
+ min_length=0, max_length=100, trust_initial_value=True
77
77
  )
78
78
  # User name for APN authentication, as provided by the cellular operator
79
79
  apn_user: str = validated_string_field(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyg90alarm
3
- Version: 2.5.0
3
+ Version: 2.5.2
4
4
  Summary: G90 Alarm system protocol
5
5
  Home-page: https://github.com/hostcc/pyg90alarm
6
6
  Author: Ilia Sotnikov
@@ -1,9 +1,9 @@
1
- pyg90alarm/__init__.py,sha256=-sDi1njCH8ihdEY4zprzwOlkas4IHnc7aqQUg1b3gR0,3617
1
+ pyg90alarm/__init__.py,sha256=ehUcPV8O2jBszU3hPAfI91nXjj2UXIfYjoREvL4QE2c,3719
2
2
  pyg90alarm/alarm.py,sha256=BDBVQ8qRa2Bx2-786uytShTw8znlFEWakxweCGvgxME,50130
3
3
  pyg90alarm/callback.py,sha256=9PVtjRs2MLn80AgiM-UJNL8ZJF4_PxcopJIpxMmB3vc,4707
4
4
  pyg90alarm/const.py,sha256=cpaMlb8rqE1EfvmUEh3Yd_29dNO0usIo_Y-esPBh8B0,8012
5
5
  pyg90alarm/event_mapping.py,sha256=hSmRWkkuA5hlauGvYakdOrw8QFt0TMNfUuDQ4J3vHpQ,3438
6
- pyg90alarm/exceptions.py,sha256=9LleQC2SkJXjv80FlWMeaHs9ZjXxCvZx9UtYdrvejyY,1951
6
+ pyg90alarm/exceptions.py,sha256=9rSd5zIKALHtRHBBLD-R5zxW-5OBkHK04uVupCnAK8s,1937
7
7
  pyg90alarm/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  pyg90alarm/cloud/__init__.py,sha256=u7ZzrIwCsdgmBmgtpCe6c_Kipdo8nG8PEOEcaAHXCxI,1407
9
9
  pyg90alarm/cloud/const.py,sha256=FYUxkj0DSI7nnXZHsJMfv8RNQiXKV3TYKGHSdfHdMjg,2113
@@ -19,7 +19,7 @@ pyg90alarm/definitions/devices.py,sha256=K0DQnyE-1hlhIGwRfZojKJYMSmlJzmyWcZ_98ur
19
19
  pyg90alarm/definitions/sensors.py,sha256=bDecBGyUo7wFVNuD5Fu1JNZQHcMDv-234BuNKioaQQs,27426
20
20
  pyg90alarm/entities/__init__.py,sha256=hHb6AOiC4Tz--rOWiiICMdLaZDs1Tf_xpWk_HeS_gO4,66
21
21
  pyg90alarm/entities/base_entity.py,sha256=hNhhuuwNuir54uVMZzPbjE0N6WL8wKvoW_KZa4R8L8U,2680
22
- pyg90alarm/entities/base_list.py,sha256=vNP0T8qg7lgrES0IBs4zOggQM6Uxyfarfds46bbAnH0,9482
22
+ pyg90alarm/entities/base_list.py,sha256=oyhCszJZuVUeIoDCmMi_1XkQ87HK297_bnbRJBpYLv0,9807
23
23
  pyg90alarm/entities/device.py,sha256=eWE_N83hiDs5I-TT5F_W0Vb8sVugLldrDc9Lj9sgVLo,3700
24
24
  pyg90alarm/entities/device_list.py,sha256=PKnHEazeT3iUEaz70bW1OaWh0wq-7WOY-7dpV4FVCTc,5984
25
25
  pyg90alarm/entities/sensor.py,sha256=pq4tARSKQC_AJlT_ZaBcqTDtaXKuyo5nz6BqmHohSQk,27649
@@ -31,10 +31,10 @@ pyg90alarm/local/base_cmd.py,sha256=f0PozHJjErIg08vn0sAacHbigJSFor8q5jdxfXiM27c,
31
31
  pyg90alarm/local/config.py,sha256=QYetAc6QLrAN8T-37D4Esifvao52w_uJ01nHciLbGME,1390
32
32
  pyg90alarm/local/discovery.py,sha256=8YVIXuNe57lhas0VSRf7QXZH83pEDGNj9oehNY4Kh2U,3576
33
33
  pyg90alarm/local/history.py,sha256=sL6_Z1BNYkuUwAZUi78d4p5hhcCfsXKw29i4Qu1O60M,10811
34
- pyg90alarm/local/host_config.py,sha256=KMtrkM7IPm2b38f_kCIVGxYvPOd9ZDoA3nIoT-2SBKg,7376
34
+ pyg90alarm/local/host_config.py,sha256=RSvg2UXPTCzzwDW6Iz3CyFtjxPUzSSdlxRMqGpWA61M,7445
35
35
  pyg90alarm/local/host_info.py,sha256=4lFIaFEpYd3EvgNrDJmKijTrzX9i29nFISLLlXGnkmE,2759
36
36
  pyg90alarm/local/host_status.py,sha256=WHGtw-A0wHILqVWP4DnZhXj8DPRGyS26AV0bL1isTz4,1863
37
- pyg90alarm/local/net_config.py,sha256=x-hrisOktdy1ChacCoVBjaOq75KiDJ36nT1JsPGS42g,5453
37
+ pyg90alarm/local/net_config.py,sha256=rK4dcC_kaalLQZcUp7FSOuV0eoj1oclvY7x_6lwYY0k,5453
38
38
  pyg90alarm/local/notifications.py,sha256=Vs6NQJciYqDALV-WwzH6wIcTGdX_UD4XBuHWjSOpCDY,4591
39
39
  pyg90alarm/local/paginated_cmd.py,sha256=5pPVP8f4ydjgu8Yq6MwqINJAUt52fFlD17wO4AI88Pc,4467
40
40
  pyg90alarm/local/paginated_result.py,sha256=p_e8QAVznp1Q5Xi9ifjb9Bx-S3ZiAkVlPKrY6r0bYLs,5483
@@ -43,8 +43,8 @@ pyg90alarm/local/user_data_crc.py,sha256=JQBOPY3RlOgVtvR55R-rM8OuKjYW-BPXQ0W4pi6
43
43
  pyg90alarm/notifications/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
44
  pyg90alarm/notifications/base.py,sha256=d3N_zNPa_jcTX4QpA78jdgMHDhmrgwqyM3HdvuO14Jk,16682
45
45
  pyg90alarm/notifications/protocol.py,sha256=TlZQ3P8-N-E2X5bzkGefz432x4lBYyIBF9VriwYn9ds,4790
46
- pyg90alarm-2.5.0.dist-info/licenses/LICENSE,sha256=f884inRbeNv-O-hbwz62Ro_1J8xiHRTnJ2cCx6A0WvU,1070
47
- pyg90alarm-2.5.0.dist-info/METADATA,sha256=3PEKVWjqGrheDbXaFgGGApdIMVaF86b9acuQb3dWUB0,12568
48
- pyg90alarm-2.5.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
49
- pyg90alarm-2.5.0.dist-info/top_level.txt,sha256=czHiGxYMyTk5QEDTDb0EpPiKqUMRa8zI4zx58Ii409M,11
50
- pyg90alarm-2.5.0.dist-info/RECORD,,
46
+ pyg90alarm-2.5.2.dist-info/licenses/LICENSE,sha256=f884inRbeNv-O-hbwz62Ro_1J8xiHRTnJ2cCx6A0WvU,1070
47
+ pyg90alarm-2.5.2.dist-info/METADATA,sha256=p4czqnkSngTxWXKDioMg8r2RIfZmFFbDGiQiSjXTAN8,12568
48
+ pyg90alarm-2.5.2.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
49
+ pyg90alarm-2.5.2.dist-info/top_level.txt,sha256=czHiGxYMyTk5QEDTDb0EpPiKqUMRa8zI4zx58Ii409M,11
50
+ pyg90alarm-2.5.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5