MCPcopy Index your code
hub / github.com/NyarchLinux/DesktopPuppet / set_motion

Method set_motion

src/gui_controller.py:66–77  ·  view source on GitHub ↗

Set a motion on the puppet.

(self, motion)

Source from the content-addressed store, hash-verified

64 return {}
65
66 def set_motion(self, motion):
67 """Set a motion on the puppet."""
68 try:
69 response = requests.post(
70 f"{self.base_url}/motion",
71 json={"motion": motion},
72 timeout=2
73 )
74 response.raise_for_status()
75 return True
76 except requests.RequestException:
77 return False
78
79 def set_settings(self, settings):
80 """Update puppet settings."""

Callers 2

_on_motion_selectedMethod · 0.45
do_POSTMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected