aboutsummaryrefslogtreecommitdiff
path: root/backend.py
diff options
context:
space:
mode:
authorArslaan Pathan <[email protected]>2026-10-06 10:24:34 +1300
committerArslaan Pathan <[email protected]>2026-10-06 10:24:34 +1300
commit31516d80bd1ca384074fd61b3c73879b5be2f0ac (patch)
tree97ee06e4f52b40b161afdf358a1a967fef3cadae /backend.py
parent7033b06aa0abaa4d07dac1ea465d6f1ec25dfa43 (diff)
downloadremote-automation-31516d80bd1ca384074fd61b3c73879b5be2f0ac.tar.xz
remote-automation-31516d80bd1ca384074fd61b3c73879b5be2f0ac.zip
volume control
Diffstat (limited to 'backend.py')
-rw-r--r--backend.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/backend.py b/backend.py
index 2b9ed9a..405bdae 100644
--- a/backend.py
+++ b/backend.py
@@ -130,5 +130,14 @@ def music_stop():
return {"status": "not_playing"}
[email protected]("/automate/volup")
+def volup():
+ os.system("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+")
+
+
[email protected]("/automate/voldown")
+def voldown():
+ os.system("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-")
+
if __name__ == "__main__":
app.run(host="0.0.0.0", port=6732)