From 902fc09b9880e99dfb37fac62277334bef925051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20van=20den=20Berg?= Date: Tue, 31 Mar 2026 10:26:19 +0200 Subject: [PATCH] feat: add fountain working mode commands to FOUNTAIN_COMMAND Add missing BLE byte sequences for MODE_NORMAL, MODE_SMART, MODE_STANDARD and MODE_INTERMITTENT to FOUNTAIN_COMMAND. These actions were already defined in FountainAction but had no corresponding byte sequence in FOUNTAIN_COMMAND, making it impossible to change the working mode via send_ble_command(). Byte format: [cmd=220, type=1, length=3, start_data=0, power=1, mode, op_type=1] - MODE_NORMAL / MODE_STANDARD: mode byte = 1 - MODE_SMART / MODE_INTERMITTENT: mode byte = 2 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- pypetkitapi/command.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pypetkitapi/command.py b/pypetkitapi/command.py index 7362d2f..96833ec 100644 --- a/pypetkitapi/command.py +++ b/pypetkitapi/command.py @@ -137,6 +137,10 @@ class FountainAction(StrEnum): FountainAction.RESET_FILTER: [222, 1, 0, 0], FountainAction.POWER_OFF: [220, 1, 3, 0, 0, 1, 1], FountainAction.POWER_ON: [220, 1, 3, 0, 1, 1, 1], + FountainAction.MODE_NORMAL: [220, 1, 3, 0, 1, 1, 1], + FountainAction.MODE_SMART: [220, 1, 3, 0, 1, 2, 1], + FountainAction.MODE_STANDARD: [220, 1, 3, 0, 1, 1, 1], + FountainAction.MODE_INTERMITTENT: [220, 1, 3, 0, 1, 2, 1], }