From 7aef39dbd133b7479a5fc60fa2ce9fdd60116ba6 Mon Sep 17 00:00:00 2001 From: flubshi <4031504+flubshi@users.noreply.github.com> Date: Wed, 11 Sep 2024 22:15:04 +0200 Subject: [PATCH] Add XML command "PlaySound" --- deebot_client/commands/xml/__init__.py | 3 +++ deebot_client/commands/xml/play_sound.py | 14 ++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 deebot_client/commands/xml/play_sound.py diff --git a/deebot_client/commands/xml/__init__.py b/deebot_client/commands/xml/__init__.py index d16c8c57..73064e85 100644 --- a/deebot_client/commands/xml/__init__.py +++ b/deebot_client/commands/xml/__init__.py @@ -9,6 +9,7 @@ from .charge_state import GetChargeState from .error import GetError from .fan_speed import GetFanSpeed +from .play_sound import PlaySound from .pos import GetPos from .stats import GetCleanSum @@ -21,12 +22,14 @@ "GetError", "GetFanSpeed", "GetPos", + "PlaySound", ] # fmt: off # ordered by file asc _COMMANDS: list[type[XmlCommand]] = [ GetError, + PlaySound, ] # fmt: on diff --git a/deebot_client/commands/xml/play_sound.py b/deebot_client/commands/xml/play_sound.py new file mode 100644 index 00000000..19eff15d --- /dev/null +++ b/deebot_client/commands/xml/play_sound.py @@ -0,0 +1,14 @@ +"""Play sound commands.""" + +from __future__ import annotations + +from .common import ExecuteCommand + + +class PlaySound(ExecuteCommand): + """Play sound command.""" + + name = "PlaySound" + + def __init__(self) -> None: + super().__init__({"sid": "30"})