nwp500-python 9.3.1__py3-none-any.whl → 9.3.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.
nwp500/models/device.py CHANGED
@@ -45,17 +45,20 @@ class DeviceErrorSummary(NavienBaseModel):
45
45
  was heard from.
46
46
  """
47
47
 
48
- #: ``NO_ERROR`` when the device has no recorded fault. Typed to accept a
49
- #: bare int as well, following ``device_type``, so a code the enum does
50
- #: not know cannot make a whole ``/device/list`` response unparseable.
48
+ #: ``NO_ERROR`` when the device has no recorded fault, and ``None`` when
49
+ #: the cloud reports no code at all - it sends ``"errorCode": null`` on
50
+ #: some devices, which is not the same claim as "no error". Typed to
51
+ #: accept a bare int as well, following ``device_type``, so neither a
52
+ #: null nor a code the enum does not know can make a whole
53
+ #: ``/device/list`` response unparseable.
51
54
  #:
52
55
  #: ``union_mode`` matters here: pydantic's default smart union matches an
53
56
  #: incoming int against the ``int`` branch exactly and never reaches the
54
57
  #: enum, so every code - known or not - would stay a plain int. Trying the
55
58
  #: branches left to right instead means a known code becomes an
56
59
  #: ``ErrorCode`` member and only an unknown one falls through to ``int``.
57
- error_code: ErrorCode | int = Field(
58
- default=ErrorCode.NO_ERROR, union_mode="left_to_right"
60
+ error_code: ErrorCode | int | None = Field(
61
+ default=None, union_mode="left_to_right"
59
62
  )
60
63
  #: Spelled "Occured" by the API; the Python name is spelled correctly.
61
64
  error_occurred_time: str | None = Field(
nwp500/reservations.py CHANGED
@@ -71,10 +71,12 @@ async def fetch_reservations(
71
71
  try:
72
72
  await mqtt.unsubscribe_reservation_response(device, on_schedule)
73
73
  except Exception:
74
+ from .mqtt.utils import redact_mac
75
+
74
76
  _logger.warning(
75
77
  "Failed to unsubscribe reservations response handler for "
76
78
  "device %s",
77
- device.device_info.mac_address,
79
+ redact_mac(device.device_info.mac_address),
78
80
  exc_info=True,
79
81
  )
80
82
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nwp500-python
3
- Version: 9.3.1
3
+ Version: 9.3.2
4
4
  Summary: A library for controlling Navien NWP500 Water Heaters via NaviLink
5
5
  Home-page: https://github.com/eman/nwp500-python
6
6
  Author: Emmanuel Levijarvi
@@ -16,7 +16,7 @@ nwp500/field_factory.py,sha256=DMQGOLZU5S-sAdT0Ue5nkmqyMAEMlGvCkEg2C8eCkB8,5200
16
16
  nwp500/mqtt_events.py,sha256=2qWDkWEzoMurZw5G6WwzL9nEtlvJ-GUCs_HvMa0024E,10148
17
17
  nwp500/openei.py,sha256=2gM3hEwrUvUEFykDgN-pKkamWomGuQNVT46XzFwOlxA,7071
18
18
  nwp500/py.typed,sha256=vlGtiygNDDmA_Ji2HjDl1SBJEcvpIC6cANFx_GonPMk,69
19
- nwp500/reservations.py,sha256=i-3WQRWeNhjppoINHtj6CmvciVlRTZyDjtrGk4_wnd8,12493
19
+ nwp500/reservations.py,sha256=0i8QJ5SD8oaXX9VjLAGtx5TNbxXoTVh67lVmGneqpgU,12553
20
20
  nwp500/temperature.py,sha256=O9pyjFaMstzfKxWtQTUDNP12YOJbS9rSwBH76s4p4MY,7982
21
21
  nwp500/topic_builder.py,sha256=ZOQbH89K_oN6Wz0Fia4UDNGNUn6wMFNEVS3k39ZdNaM,2482
22
22
  nwp500/tou_schedule.py,sha256=sPwceU3sXbEqJCrFMsNZsZRg4DE4TsROkgVN-qXzlk0,3675
@@ -32,7 +32,7 @@ nwp500/cli/rich_output.py,sha256=Qy9doaDPnX4IP-Oahu2gfuYfsfpB0WYtdeLfVmMQmdc,227
32
32
  nwp500/cli/token_storage.py,sha256=zfFGah0l5owWYIk2uA2OTmgCu1nLdhYFYcVA5JEkwCE,2077
33
33
  nwp500/models/__init__.py,sha256=VAPDE7u3f0lmhL2CnBxbLqf-1EbHSiqEdTkb-JSZwSM,2217
34
34
  nwp500/models/_converters.py,sha256=lNQPigKfsVPE5RvX9-s0_UA3j35tF3hQidcpRNIWwyY,2427
35
- nwp500/models/device.py,sha256=LItaPuimXK_wpzXSL2hVf5MZuNmOOAyBsSRk9Ws3tH4,3414
35
+ nwp500/models/device.py,sha256=zkq1S54UTd3rbh6zd1BC7qjc0BMXAb7VDidXZmvw9-0,3588
36
36
  nwp500/models/energy.py,sha256=y0eIADWhrC3YWRRBfbD3NNWsFvbLhY8GB5HuqGtlJ2s,2017
37
37
  nwp500/models/feature.py,sha256=7z1pDoW0LQGxv8__AlQn5M35lZRKgeybgwfnw2OCKIM,15433
38
38
  nwp500/models/mqtt_models.py,sha256=1Etfn0lqiWvoUsW2niT6wXdZtNvN0sGjn7F1uPJQ9yU,774
@@ -53,9 +53,9 @@ nwp500/mqtt/state_tracker.py,sha256=uZlDFNYn7DOXmXPbk-8jXva_QKEvLES9T_BYbQSkhvM,
53
53
  nwp500/mqtt/subscriptions.py,sha256=5z5EWJKmgfGkT0gFcw8Wxqki9v-bTbshVc9jnmviwHY,31978
54
54
  nwp500/mqtt/types.py,sha256=86R7gwsc1XabA_ABWeALeC5EImlTziFFn1DrP1x8Yy4,1605
55
55
  nwp500/mqtt/utils.py,sha256=LAp678M8hzqhlgWBXt3Re59TbnMkX9l1fa57WtE2yug,13000
56
- nwp500_python-9.3.1.dist-info/licenses/LICENSE.txt,sha256=EUOsypJ3iEqJ-9tdo_TSZHwB0Rd-7p0JzToEI5CMBJU,1085
57
- nwp500_python-9.3.1.dist-info/METADATA,sha256=8Y_eTzOdZUuunfg-ZCxR2LEaq_VAGxF_i7OXTtMPJU0,5091
58
- nwp500_python-9.3.1.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
59
- nwp500_python-9.3.1.dist-info/entry_points.txt,sha256=p8vGDEbUIOT_TzDG-XnJ3lw-9yaeHrDPNN7fAx4-78I,52
60
- nwp500_python-9.3.1.dist-info/top_level.txt,sha256=DRPIenxKnssWeaetq428gYfwrKjLGN1z2NOtztIvxZE,7
61
- nwp500_python-9.3.1.dist-info/RECORD,,
56
+ nwp500_python-9.3.2.dist-info/licenses/LICENSE.txt,sha256=EUOsypJ3iEqJ-9tdo_TSZHwB0Rd-7p0JzToEI5CMBJU,1085
57
+ nwp500_python-9.3.2.dist-info/METADATA,sha256=DJnyePJsNABe4Du8W8ngv9Q5IlUbeyA6RPNr5OaQ3iI,5091
58
+ nwp500_python-9.3.2.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
59
+ nwp500_python-9.3.2.dist-info/entry_points.txt,sha256=p8vGDEbUIOT_TzDG-XnJ3lw-9yaeHrDPNN7fAx4-78I,52
60
+ nwp500_python-9.3.2.dist-info/top_level.txt,sha256=DRPIenxKnssWeaetq428gYfwrKjLGN1z2NOtztIvxZE,7
61
+ nwp500_python-9.3.2.dist-info/RECORD,,