mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-22 19:23:34 +00:00
Add vacuum component queries to dump_devinfo (#1320)
This commit is contained in:
parent
5ef8f21b4d
commit
d122b48788
@ -157,6 +157,8 @@ def scrub(res):
|
|||||||
v = "#MASKED_NAME#"
|
v = "#MASKED_NAME#"
|
||||||
elif isinstance(res[k], int):
|
elif isinstance(res[k], int):
|
||||||
v = 0
|
v = 0
|
||||||
|
elif k in ["map_data"]: #
|
||||||
|
v = "#SCRUBBED_MAPDATA#"
|
||||||
elif k in ["device_id", "dev_id"] and "SCRUBBED" in v:
|
elif k in ["device_id", "dev_id"] and "SCRUBBED" in v:
|
||||||
pass # already scrubbed
|
pass # already scrubbed
|
||||||
elif k == ["device_id", "dev_id"] and len(v) > 40:
|
elif k == ["device_id", "dev_id"] and len(v) > 40:
|
||||||
|
@ -425,4 +425,28 @@ COMPONENT_REQUESTS = {
|
|||||||
"dimmer_calibration": [],
|
"dimmer_calibration": [],
|
||||||
"fan_control": [],
|
"fan_control": [],
|
||||||
"overheat_protection": [],
|
"overheat_protection": [],
|
||||||
|
# Vacuum components
|
||||||
|
"clean": [
|
||||||
|
SmartRequest.get_raw_request("get_clean_records"),
|
||||||
|
SmartRequest.get_raw_request("get_vac_state"),
|
||||||
|
],
|
||||||
|
"battery": [SmartRequest.get_raw_request("get_battery_info")],
|
||||||
|
"consumables": [SmartRequest.get_raw_request("get_consumables_info")],
|
||||||
|
"direction_control": [],
|
||||||
|
"button_and_led": [],
|
||||||
|
"speaker": [
|
||||||
|
SmartRequest.get_raw_request("get_support_voice_language"),
|
||||||
|
SmartRequest.get_raw_request("get_current_voice_language"),
|
||||||
|
],
|
||||||
|
"map": [
|
||||||
|
SmartRequest.get_raw_request("get_map_info"),
|
||||||
|
SmartRequest.get_raw_request("get_map_data"),
|
||||||
|
],
|
||||||
|
"auto_change_map": [SmartRequest.get_raw_request("get_auto_change_map")],
|
||||||
|
"dust_bucket": [SmartRequest.get_raw_request("get_auto_dust_collection")],
|
||||||
|
"mop": [SmartRequest.get_raw_request("get_mop_state")],
|
||||||
|
"do_not_disturb": [SmartRequest.get_raw_request("get_do_not_disturb")],
|
||||||
|
"charge_pose_clean": [],
|
||||||
|
"continue_breakpoint_sweep": [],
|
||||||
|
"goto_point": [],
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user