code: def get_state(self, force_update=False):
          
          if force_update or self._state is None:
              return int(self.basicevent.GetBinaryState()['BinaryState'])
          return self._state
docs: Returns 0 if off and 1 if on.