MCPcopy
hub / github.com/rytilahti/python-miio / _set_state

Method _set_state

miio/tests/dummies.py:50–54  ·  view source on GitHub ↗

Set a state of a variable, the value is expected to be an array with length of 1.

(self, var, value)

Source from the content-addressed store, hash-verified

48 self.state = self.start_state.copy()
49
50 def _set_state(self, var, value):
51 """Set a state of a variable, the value is expected to be an array with length
52 of 1."""
53 # print("setting %s = %s" % (var, value))
54 self.state[var] = value.pop(0)
55
56 def _get_state(self, props):
57 """Return wanted properties."""

Callers 15

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by 15

__init__Method · 0.36
__init__Method · 0.36
__init__Method · 0.36
__init__Method · 0.36
__init__Method · 0.36
__init__Method · 0.36
__init__Method · 0.36
__init__Method · 0.36
__init__Method · 0.36
__init__Method · 0.36
__init__Method · 0.36