Skip to content

Commit

Permalink
fix: MagnetShockCurrentStatus parsing #84
Browse files Browse the repository at this point in the history
  • Loading branch information
petrleocompel committed Jan 22, 2024
1 parent 8c93805 commit 3d34d6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/hikvision_axpro/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ def from_dict(obj: Any) -> 'Zone':
_LOGGER.warning("Detector info: %s", obj)
access_module_type = None
try:
magnet_shock_current_status = from_union([MagnetShockCurrentStatus, from_none], obj.get("MagnetShockCurrentStatus"))
magnet_shock_current_status = from_union([MagnetShockCurrentStatus.from_dict, from_none], obj.get("MagnetShockCurrentStatus"))
except:
_LOGGER.warning("Invalid MagnetShockCurrentStatus %s", obj.get("MagnetShockCurrentStatus"))
_LOGGER.warning("Detector info: %s", obj)
Expand Down

0 comments on commit 3d34d6c

Please sign in to comment.