Skip to content

Commit

Permalink
Attempt in fixing #352
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianTremblay committed Jan 17, 2025
1 parent d4afa81 commit 84a7e78
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions BAC0/core/io/Read.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def readMultiple()
RangeByPosition,
RangeBySequenceNumber,
RangeByTime,
EngineeringUnits,
)
from bacpypes3.errors import NoResponse, ObjectError
from bacpypes3.object import get_vendor_info
Expand Down Expand Up @@ -183,7 +184,14 @@ async def read(
"Using a default value of On for internal needs."
)
return "True"
if "units" in args:
self._log.warning(
"The units property is not implemented in the device. We will consider noUnits"
"Using a default value for internal needs. Please note that units is a required property for BACnet objects like analog values. The device you are reading from may be non-compliant."
)
return EngineeringUnits("noUnits")
else:

raise UnknownPropertyError(f"Unknown property {args}")
else:
self.log(f"Error : {err}", level="error")
Expand Down

0 comments on commit 84a7e78

Please sign in to comment.