Пример #1
0
 def __init__(
     self,
     device,
     name,
     state,
     timeout=None,
     timestamp=None,
     message=None,
     children=None,
     **junk
 ):
     self.device = device
     self.name = name
     self.state = checks.dictionary(state, const.State)
     self.timeout = timeout
     self.timestamp = timestamp
     self.message = message
     self.children = checks.children(children, self.child_class)
Пример #2
0
 def __init__(self, device, value, name=None, **junk):
     self.device = device
     self.name = name
     self.value = checks.dictionary(value, const.BLOBEnable)
Пример #3
0
 def __init__(self, *args, rule, **kwargs):
     super().__init__(*args, **kwargs)
     self.rule = checks.dictionary(rule, const.SwitchRule)
Пример #4
0
 def __init__(self, *args, perm, timeout=None, **kwargs):
     super().__init__(*args, **kwargs)
     self.perm = checks.dictionary(perm, const.Permissions)
     self.timeout = timeout
Пример #5
0
 def check_value(self, value):
     return checks.dictionary(value, const.SwitchState)
Пример #6
0
 def state_(self, value):
     self._state = checks.dictionary(value, const.State)
     self.device.send_message(self.to_set_message())
Пример #7
0
 def check_value(self, value):
     value = checks.dictionary(value, const.SwitchState)
     return self._vector.apply_rule(self, value)