From 9bec56ed6cba763d92f3dedf6cbca6968fae065f Mon Sep 17 00:00:00 2001 From: linuswck Date: Thu, 10 Oct 2024 15:19:43 +0800 Subject: [PATCH] driver: Add support for GetPollInterval cmd --- pykirdy/driver/kirdy.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pykirdy/driver/kirdy.py b/pykirdy/driver/kirdy.py index 860e14b..48df3d1 100644 --- a/pykirdy/driver/kirdy.py +++ b/pykirdy/driver/kirdy.py @@ -66,6 +66,7 @@ class CmdList: SetPidOutMin = _dt.f32, SetPidOutMax = _dt.f32, ConfigTempAdcFilter = _dt.temp_adc_filter, + GetPollInterval = _dt.none, SetTempMonUpperLimit = _dt.f32, SetTempMonLowerLimit = _dt.f32, ClearAlarm = _dt.none, @@ -620,6 +621,10 @@ class Thermostat: } return await self._send_raw_cmd(cmd) + + async def get_poll_interval(self): + return await self._send_cmd(self._cmd._target, self._cmd.GetPollInterval, msg_type="Interval") + class Kirdy: def __init__(self): self.device = Device(self._send_cmd, self._send_raw_cmd)