mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-12 18:38:03 +00:00
Allow passing alarm parameter overrides (#1340)
Allows specifying alarm parameters duration, volume and sound. Adds new feature: `alarm_duration`. Breaking change to `alarm_volume' on the `smart.Alarm` module is changed from `str` to `int` Co-authored-by: Steven B <51370195+sdb9696@users.noreply.github.com>
This commit is contained in:
@@ -134,11 +134,9 @@ class FakeSmartTransport(BaseTransport):
|
||||
"get_alarm_configure": (
|
||||
"alarm",
|
||||
{
|
||||
"get_alarm_configure": {
|
||||
"duration": 10,
|
||||
"type": "Doorbell Ring 2",
|
||||
"volume": "low",
|
||||
}
|
||||
"duration": 10,
|
||||
"type": "Doorbell Ring 2",
|
||||
"volume": "low",
|
||||
},
|
||||
),
|
||||
"get_support_alarm_type_list": (
|
||||
@@ -672,7 +670,7 @@ class FakeSmartTransport(BaseTransport):
|
||||
self.fixture_name, set()
|
||||
).add(method)
|
||||
return retval
|
||||
elif method in ["set_qs_info", "fw_download"]:
|
||||
elif method in ["set_qs_info", "fw_download", "play_alarm", "stop_alarm"]:
|
||||
return {"error_code": 0}
|
||||
elif method == "set_dynamic_light_effect_rule_enable":
|
||||
self._set_dynamic_light_effect(info, params)
|
||||
|
Reference in New Issue
Block a user