code: def enumValue(self):
          
          try:
              return self.properties.units_state[int(self.lastValue) - 1]
          except IndexError:
              value = "unknown"
          except ValueError:
              value = "NaN"
          return value
docs: returns: (str) Enum state value