Skip to content

Commit

Permalink
Covering cases where unitstates aren't provided
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianTremblay committed Oct 13, 2020
1 parent 79e70a1 commit ad34e2c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion BAC0/core/devices/Points.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,10 @@ def value(self):
return res

def get_state(self, v):
return self.properties.units_state[v - 1]
try:
return self.properties.units_state[v - 1]
except TypeError:
return "n/a"

@property
def enumValue(self):
Expand Down

0 comments on commit ad34e2c

Please sign in to comment.