2024-01-02 17:20:53 +00:00
|
|
|
"""SmartRequest helper classes and functions for new SMART/TAPO devices.
|
|
|
|
|
|
|
|
List of known requests with associated parameter classes.
|
|
|
|
|
|
|
|
Other requests that are known but not currently implemented
|
|
|
|
or tested are:
|
|
|
|
|
|
|
|
get_child_device_component_list
|
|
|
|
get_child_device_list
|
|
|
|
control_child
|
|
|
|
get_device_running_info - seems to be a subset of get_device_info
|
|
|
|
|
|
|
|
get_tss_info
|
|
|
|
get_raw_dvi
|
|
|
|
get_homekit_info
|
|
|
|
|
|
|
|
fw_download
|
|
|
|
|
|
|
|
sync_env
|
|
|
|
account_sync
|
|
|
|
|
|
|
|
device_reset
|
|
|
|
close_device_ble
|
|
|
|
heart_beat
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
2024-04-17 13:39:24 +00:00
|
|
|
from __future__ import annotations
|
|
|
|
|
2024-01-02 17:20:53 +00:00
|
|
|
import logging
|
|
|
|
from dataclasses import asdict, dataclass
|
|
|
|
|
|
|
|
_LOGGER = logging.getLogger(__name__)
|
|
|
|
|
|
|
|
|
|
|
|
class SmartRequest:
|
|
|
|
"""Class to represent a smart protocol request."""
|
|
|
|
|
2024-04-17 13:39:24 +00:00
|
|
|
def __init__(self, method_name: str, params: SmartRequestParams | None = None):
|
2024-01-02 17:20:53 +00:00
|
|
|
self.method_name = method_name
|
|
|
|
if params:
|
|
|
|
self.params = params.to_dict()
|
|
|
|
else:
|
|
|
|
self.params = None
|
|
|
|
|
|
|
|
def __repr__(self):
|
|
|
|
return f"SmartRequest({self.method_name})"
|
|
|
|
|
|
|
|
def to_dict(self):
|
|
|
|
"""Return the request as a dict suitable for passing to query()."""
|
|
|
|
return {self.method_name: self.params}
|
|
|
|
|
|
|
|
@dataclass
|
|
|
|
class SmartRequestParams:
|
|
|
|
"""Base class for Smart request params.
|
|
|
|
|
|
|
|
The to_dict() method of this class omits null values which
|
|
|
|
is required by the devices.
|
|
|
|
"""
|
|
|
|
|
|
|
|
def to_dict(self):
|
|
|
|
"""Return the params as a dict with values of None ommited."""
|
|
|
|
return asdict(
|
|
|
|
self, dict_factory=lambda x: {k: v for (k, v) in x if v is not None}
|
|
|
|
)
|
|
|
|
|
|
|
|
@dataclass
|
|
|
|
class DeviceOnParams(SmartRequestParams):
|
|
|
|
"""Get Rules Params."""
|
|
|
|
|
|
|
|
device_on: bool
|
|
|
|
|
|
|
|
@dataclass
|
|
|
|
class GetRulesParams(SmartRequestParams):
|
|
|
|
"""Get Rules Params."""
|
|
|
|
|
|
|
|
start_index: int = 0
|
|
|
|
|
2024-02-28 16:04:57 +00:00
|
|
|
@dataclass
|
|
|
|
class GetScheduleRulesParams(SmartRequestParams):
|
|
|
|
"""Get Rules Params."""
|
|
|
|
|
|
|
|
start_index: int = 0
|
|
|
|
schedule_mode: str = ""
|
|
|
|
|
2024-01-02 17:20:53 +00:00
|
|
|
@dataclass
|
|
|
|
class GetTriggerLogsParams(SmartRequestParams):
|
|
|
|
"""Trigger Logs params."""
|
|
|
|
|
|
|
|
page_size: int = 5
|
|
|
|
start_id: int = 0
|
|
|
|
|
|
|
|
@dataclass
|
|
|
|
class LedStatusParams(SmartRequestParams):
|
|
|
|
"""LED Status params."""
|
|
|
|
|
2024-04-17 13:39:24 +00:00
|
|
|
led_rule: str | None = None
|
2024-01-02 17:20:53 +00:00
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def from_bool(state: bool):
|
|
|
|
"""Set the led_rule from the state."""
|
|
|
|
rule = "always" if state else "never"
|
|
|
|
return SmartRequest.LedStatusParams(led_rule=rule)
|
|
|
|
|
|
|
|
@dataclass
|
|
|
|
class LightInfoParams(SmartRequestParams):
|
|
|
|
"""LightInfo params."""
|
|
|
|
|
2024-04-17 13:39:24 +00:00
|
|
|
brightness: int | None = None
|
|
|
|
color_temp: int | None = None
|
|
|
|
hue: int | None = None
|
|
|
|
saturation: int | None = None
|
2024-01-02 17:20:53 +00:00
|
|
|
|
|
|
|
@dataclass
|
|
|
|
class DynamicLightEffectParams(SmartRequestParams):
|
|
|
|
"""LightInfo params."""
|
|
|
|
|
|
|
|
enable: bool
|
2024-04-17 13:39:24 +00:00
|
|
|
id: str | None = None
|
2024-01-02 17:20:53 +00:00
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def get_raw_request(
|
2024-04-17 13:39:24 +00:00
|
|
|
method: str, params: SmartRequestParams | None = None
|
|
|
|
) -> SmartRequest:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Send a raw request to the device."""
|
|
|
|
return SmartRequest(method, params)
|
|
|
|
|
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def component_nego() -> SmartRequest:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Get quick setup component info."""
|
|
|
|
return SmartRequest("component_nego")
|
|
|
|
|
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def get_device_info() -> SmartRequest:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Get device info."""
|
|
|
|
return SmartRequest("get_device_info")
|
|
|
|
|
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def get_device_usage() -> SmartRequest:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Get device usage."""
|
|
|
|
return SmartRequest("get_device_usage")
|
|
|
|
|
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def device_info_list(ver_code) -> list[SmartRequest]:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Get device info list."""
|
2024-02-14 19:43:10 +00:00
|
|
|
if ver_code == 1:
|
|
|
|
return [SmartRequest.get_device_info()]
|
2024-01-02 17:20:53 +00:00
|
|
|
return [
|
|
|
|
SmartRequest.get_device_info(),
|
|
|
|
SmartRequest.get_device_usage(),
|
2024-02-14 19:43:10 +00:00
|
|
|
SmartRequest.get_auto_update_info(),
|
2024-01-02 17:20:53 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def get_auto_update_info() -> SmartRequest:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Get auto update info."""
|
|
|
|
return SmartRequest("get_auto_update_info")
|
|
|
|
|
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def firmware_info_list() -> list[SmartRequest]:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Get info list."""
|
|
|
|
return [
|
|
|
|
SmartRequest.get_raw_request("get_fw_download_state"),
|
|
|
|
SmartRequest.get_raw_request("get_latest_fw"),
|
|
|
|
]
|
|
|
|
|
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def qs_component_nego() -> SmartRequest:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Get quick setup component info."""
|
|
|
|
return SmartRequest("qs_component_nego")
|
|
|
|
|
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def get_device_time() -> SmartRequest:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Get device time."""
|
|
|
|
return SmartRequest("get_device_time")
|
|
|
|
|
2024-02-28 16:04:57 +00:00
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def get_child_device_list() -> SmartRequest:
|
2024-02-28 16:04:57 +00:00
|
|
|
"""Get child device list."""
|
|
|
|
return SmartRequest("get_child_device_list")
|
|
|
|
|
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def get_child_device_component_list() -> SmartRequest:
|
2024-02-28 16:04:57 +00:00
|
|
|
"""Get child device component list."""
|
|
|
|
return SmartRequest("get_child_device_component_list")
|
|
|
|
|
2024-01-02 17:20:53 +00:00
|
|
|
@staticmethod
|
2024-02-14 19:43:10 +00:00
|
|
|
def get_wireless_scan_info(
|
2024-04-17 13:39:24 +00:00
|
|
|
params: GetRulesParams | None = None,
|
|
|
|
) -> SmartRequest:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Get wireless scan info."""
|
2024-02-14 19:43:10 +00:00
|
|
|
return SmartRequest(
|
|
|
|
"get_wireless_scan_info", params or SmartRequest.GetRulesParams()
|
|
|
|
)
|
2024-01-02 17:20:53 +00:00
|
|
|
|
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def get_schedule_rules(params: GetRulesParams | None = None) -> SmartRequest:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Get schedule rules."""
|
|
|
|
return SmartRequest(
|
2024-02-28 16:04:57 +00:00
|
|
|
"get_schedule_rules", params or SmartRequest.GetScheduleRulesParams()
|
2024-01-02 17:20:53 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def get_next_event(params: GetRulesParams | None = None) -> SmartRequest:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Get next scheduled event."""
|
|
|
|
return SmartRequest("get_next_event", params or SmartRequest.GetRulesParams())
|
|
|
|
|
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def schedule_info_list() -> list[SmartRequest]:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Get schedule info list."""
|
|
|
|
return [
|
|
|
|
SmartRequest.get_schedule_rules(),
|
|
|
|
SmartRequest.get_next_event(),
|
|
|
|
]
|
|
|
|
|
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def get_countdown_rules(params: GetRulesParams | None = None) -> SmartRequest:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Get countdown rules."""
|
|
|
|
return SmartRequest(
|
|
|
|
"get_countdown_rules", params or SmartRequest.GetRulesParams()
|
|
|
|
)
|
|
|
|
|
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def get_antitheft_rules(params: GetRulesParams | None = None) -> SmartRequest:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Get antitheft rules."""
|
|
|
|
return SmartRequest(
|
|
|
|
"get_antitheft_rules", params or SmartRequest.GetRulesParams()
|
|
|
|
)
|
|
|
|
|
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def get_led_info(params: LedStatusParams | None = None) -> SmartRequest:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Get led info."""
|
|
|
|
return SmartRequest("get_led_info", params or SmartRequest.LedStatusParams())
|
|
|
|
|
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def get_auto_off_config(params: GetRulesParams | None = None) -> SmartRequest:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Get auto off config."""
|
|
|
|
return SmartRequest(
|
|
|
|
"get_auto_off_config", params or SmartRequest.GetRulesParams()
|
|
|
|
)
|
|
|
|
|
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def get_delay_action_info() -> SmartRequest:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Get delay action info."""
|
|
|
|
return SmartRequest("get_delay_action_info")
|
|
|
|
|
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def auto_off_list() -> list[SmartRequest]:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Get energy usage."""
|
|
|
|
return [
|
|
|
|
SmartRequest.get_auto_off_config(),
|
|
|
|
SmartRequest.get_delay_action_info(), # May not live here
|
|
|
|
]
|
|
|
|
|
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def get_energy_usage() -> SmartRequest:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Get energy usage."""
|
|
|
|
return SmartRequest("get_energy_usage")
|
|
|
|
|
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def energy_monitoring_list() -> list[SmartRequest]:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Get energy usage."""
|
|
|
|
return [
|
|
|
|
SmartRequest("get_energy_usage"),
|
2024-11-20 17:59:09 +00:00
|
|
|
SmartRequest("get_emeter_data"),
|
|
|
|
SmartRequest("get_emeter_vgain_igain"),
|
2024-01-02 17:20:53 +00:00
|
|
|
SmartRequest.get_raw_request("get_electricity_price_config"),
|
|
|
|
]
|
|
|
|
|
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def get_current_power() -> SmartRequest:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Get current power."""
|
|
|
|
return SmartRequest("get_current_power")
|
|
|
|
|
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def power_protection_list() -> list[SmartRequest]:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Get power protection info list."""
|
|
|
|
return [
|
|
|
|
SmartRequest.get_current_power(),
|
|
|
|
SmartRequest.get_raw_request("get_max_power"),
|
|
|
|
SmartRequest.get_raw_request("get_protection_power"),
|
|
|
|
]
|
|
|
|
|
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def get_preset_rules(params: GetRulesParams | None = None) -> SmartRequest:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Get preset rules."""
|
|
|
|
return SmartRequest("get_preset_rules", params or SmartRequest.GetRulesParams())
|
|
|
|
|
2024-07-04 07:02:50 +00:00
|
|
|
@staticmethod
|
|
|
|
def get_on_off_gradually_info(
|
|
|
|
params: SmartRequestParams | None = None,
|
|
|
|
) -> SmartRequest:
|
|
|
|
"""Get preset rules."""
|
|
|
|
return SmartRequest(
|
|
|
|
"get_on_off_gradually_info", params or SmartRequest.SmartRequestParams()
|
|
|
|
)
|
|
|
|
|
2024-01-02 17:20:53 +00:00
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def get_auto_light_info() -> SmartRequest:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Get auto light info."""
|
|
|
|
return SmartRequest("get_auto_light_info")
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def get_dynamic_light_effect_rules(
|
2024-04-17 13:39:24 +00:00
|
|
|
params: GetRulesParams | None = None,
|
|
|
|
) -> SmartRequest:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Get dynamic light effect rules."""
|
|
|
|
return SmartRequest(
|
|
|
|
"get_dynamic_light_effect_rules", params or SmartRequest.GetRulesParams()
|
|
|
|
)
|
|
|
|
|
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def set_device_on(params: DeviceOnParams) -> SmartRequest:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Set device on state."""
|
|
|
|
return SmartRequest("set_device_info", params)
|
|
|
|
|
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def set_light_info(params: LightInfoParams) -> SmartRequest:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Set color temperature."""
|
|
|
|
return SmartRequest("set_device_info", params)
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def set_dynamic_light_effect_rule_enable(
|
2024-02-22 18:11:30 +00:00
|
|
|
params: DynamicLightEffectParams,
|
2024-04-17 13:39:24 +00:00
|
|
|
) -> SmartRequest:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Enable dynamic light effect rule."""
|
|
|
|
return SmartRequest("set_dynamic_light_effect_rule_enable", params)
|
|
|
|
|
|
|
|
@staticmethod
|
2024-04-17 13:39:24 +00:00
|
|
|
def get_component_info_requests(component_nego_response) -> list[SmartRequest]:
|
2024-01-02 17:20:53 +00:00
|
|
|
"""Get a list of requests based on the component info response."""
|
2024-04-17 13:39:24 +00:00
|
|
|
request_list: list[SmartRequest] = []
|
2024-01-02 17:20:53 +00:00
|
|
|
for component in component_nego_response["component_list"]:
|
2024-02-14 19:43:10 +00:00
|
|
|
if (
|
|
|
|
requests := get_component_requests(
|
|
|
|
component["id"], int(component["ver_code"])
|
|
|
|
)
|
|
|
|
) is not None:
|
2024-01-02 17:20:53 +00:00
|
|
|
request_list.extend(requests)
|
|
|
|
return request_list
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def _create_request_dict(
|
2024-04-17 13:39:24 +00:00
|
|
|
smart_request: SmartRequest | list[SmartRequest],
|
2024-01-02 17:20:53 +00:00
|
|
|
) -> dict:
|
|
|
|
"""Create request dict to be passed to SmartProtocol.query()."""
|
|
|
|
if isinstance(smart_request, list):
|
|
|
|
request = {}
|
|
|
|
for sr in smart_request:
|
|
|
|
request[sr.method_name] = sr.params
|
|
|
|
else:
|
|
|
|
request = smart_request.to_dict()
|
|
|
|
return request
|
|
|
|
|
|
|
|
|
2024-02-14 19:43:10 +00:00
|
|
|
def get_component_requests(component_id, ver_code):
|
|
|
|
"""Get the requests supported by the component and version."""
|
|
|
|
if (cr := COMPONENT_REQUESTS.get(component_id)) is None:
|
|
|
|
return None
|
|
|
|
if callable(cr):
|
2024-10-18 11:06:22 +00:00
|
|
|
return SmartRequest._create_request_dict(cr(ver_code))
|
|
|
|
return SmartRequest._create_request_dict(cr)
|
2024-02-14 19:43:10 +00:00
|
|
|
|
|
|
|
|
2024-01-02 17:20:53 +00:00
|
|
|
COMPONENT_REQUESTS = {
|
2024-02-14 19:43:10 +00:00
|
|
|
"device": SmartRequest.device_info_list,
|
2024-01-02 17:20:53 +00:00
|
|
|
"firmware": SmartRequest.firmware_info_list(),
|
|
|
|
"quick_setup": [SmartRequest.qs_component_nego()],
|
|
|
|
"inherit": [SmartRequest.get_raw_request("get_inherit_info")],
|
|
|
|
"time": [SmartRequest.get_device_time()],
|
|
|
|
"wireless": [SmartRequest.get_wireless_scan_info()],
|
|
|
|
"schedule": SmartRequest.schedule_info_list(),
|
|
|
|
"countdown": [SmartRequest.get_countdown_rules()],
|
|
|
|
"antitheft": [SmartRequest.get_antitheft_rules()],
|
2024-02-14 19:43:10 +00:00
|
|
|
"account": [],
|
|
|
|
"synchronize": [], # sync_env
|
|
|
|
"sunrise_sunset": [], # for schedules
|
2024-01-02 17:20:53 +00:00
|
|
|
"led": [SmartRequest.get_led_info()],
|
|
|
|
"cloud_connect": [SmartRequest.get_raw_request("get_connect_cloud_state")],
|
2024-02-14 19:43:10 +00:00
|
|
|
"iot_cloud": [],
|
|
|
|
"device_local_time": [],
|
|
|
|
"default_states": [], # in device_info
|
2024-01-02 17:20:53 +00:00
|
|
|
"auto_off": [SmartRequest.get_auto_off_config()],
|
2024-02-14 19:43:10 +00:00
|
|
|
"localSmart": [],
|
2024-01-02 17:20:53 +00:00
|
|
|
"energy_monitoring": SmartRequest.energy_monitoring_list(),
|
|
|
|
"power_protection": SmartRequest.power_protection_list(),
|
2024-02-14 19:43:10 +00:00
|
|
|
"current_protection": [], # overcurrent in device_info
|
2024-02-23 23:12:19 +00:00
|
|
|
"matter": [SmartRequest.get_raw_request("get_matter_setup_info")],
|
2024-01-02 17:20:53 +00:00
|
|
|
"preset": [SmartRequest.get_preset_rules()],
|
2024-02-14 19:43:10 +00:00
|
|
|
"brightness": [], # in device_info
|
|
|
|
"color": [], # in device_info
|
|
|
|
"color_temperature": [], # in device_info
|
2024-01-02 17:20:53 +00:00
|
|
|
"auto_light": [SmartRequest.get_auto_light_info()],
|
|
|
|
"light_effect": [SmartRequest.get_dynamic_light_effect_rules()],
|
2024-02-14 19:43:10 +00:00
|
|
|
"bulb_quick_control": [],
|
2024-07-04 07:02:50 +00:00
|
|
|
"on_off_gradually": [SmartRequest.get_on_off_gradually_info()],
|
2024-02-14 19:43:10 +00:00
|
|
|
"light_strip": [],
|
2024-01-10 18:40:36 +00:00
|
|
|
"light_strip_lighting_effect": [
|
|
|
|
SmartRequest.get_raw_request("get_lighting_effect")
|
|
|
|
],
|
2024-02-14 19:43:10 +00:00
|
|
|
"music_rhythm": [], # music_rhythm_enable in device_info
|
2024-01-10 18:40:36 +00:00
|
|
|
"segment": [SmartRequest.get_raw_request("get_device_segment")],
|
|
|
|
"segment_effect": [SmartRequest.get_raw_request("get_segment_effect_rule")],
|
2024-02-23 23:12:19 +00:00
|
|
|
"device_load": [SmartRequest.get_raw_request("get_device_load_info")],
|
|
|
|
"child_quick_setup": [
|
|
|
|
SmartRequest.get_raw_request("get_support_child_device_category")
|
|
|
|
],
|
|
|
|
"alarm": [
|
|
|
|
SmartRequest.get_raw_request("get_support_alarm_type_list"),
|
|
|
|
SmartRequest.get_raw_request("get_alarm_configure"),
|
|
|
|
],
|
|
|
|
"alarm_logs": [SmartRequest.get_raw_request("get_alarm_triggers")],
|
2024-10-29 09:50:27 +00:00
|
|
|
"trigger_log": [
|
|
|
|
SmartRequest.get_raw_request(
|
|
|
|
"get_trigger_logs", SmartRequest.GetTriggerLogsParams()
|
|
|
|
)
|
|
|
|
],
|
|
|
|
"double_click": [SmartRequest.get_raw_request("get_double_click_info")],
|
2024-02-28 16:04:57 +00:00
|
|
|
"child_device": [
|
|
|
|
SmartRequest.get_raw_request("get_child_device_list"),
|
|
|
|
SmartRequest.get_raw_request("get_child_device_component_list"),
|
|
|
|
],
|
|
|
|
"control_child": [],
|
|
|
|
"homekit": [SmartRequest.get_raw_request("get_homekit_info")],
|
|
|
|
"dimmer_calibration": [],
|
|
|
|
"fan_control": [],
|
|
|
|
"overheat_protection": [],
|
2024-01-02 17:20:53 +00:00
|
|
|
}
|