AI Slop Code RIsk Monitor

XiaoMi/ha_xiaomi_home

Xiaomi Home Integration for Home Assistant

12.1 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for XiaoMi/ha_xiaomi_home, a Python project with 22,178 GitHub stars. SynthScan examined 33,839 lines of code across 97 source files, recording 267 pattern matches distributed across 12 syntactic categories. The legacy adjusted pattern signal is 12.1 (Moderate pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

12.1
Adjusted Signal
12.1
Raw Pattern Score
100%
Time Factor
2026-09-28
Last Push
22.2K
Stars
Python
Language
33.8K
Lines of Code
97
Files
267
Pattern Hits
2026-10-12
Scan Date
0.39
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 18.1/100 · LOW

Can maintainers explain intent, assumptions, and trade-offs? 145 finding(s).

Hallucinated Dependency & Supply Chain Risk 2.8/100 · LOW

Are imports declared and package/API names verified? 19 finding(s).

Agent Over-Engineering Ratio 39.7/100 · MEDIUM

Are wrappers, guards, and repeated structures necessary? 200 finding(s).

PR Review Velocity Impact 50.3/100 · HIGH

Which changes need focused human review? 267 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 38MEDIUM 8LOW 221

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 267 distinct pattern matches across 12 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Cross-File Repetition35 hits · 175 pts
SeverityFileLineSnippetContext
HIGHcustom_components/xiaomi_home/event.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/cover.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/sensor.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/fan.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/light.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/number.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/humidifier.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/media_player.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/__init__.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/notify.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/vacuum.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/switch.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/button.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/text.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/binary_sensor.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/select.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/water_heater.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/climate.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/device_tracker.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/config_flow.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/miot/miot_mips.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/miot/miot_network.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/miot/miot_lan.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/miot/miot_storage.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/miot/miot_i18n.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/miot/miot_client.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/miot/miot_device.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/miot/common.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/miot/web_pages.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/miot/miot_error.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/miot/miot_mdns.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/miot/const.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/miot/miot_spec.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGHcustom_components/xiaomi_home/miot/miot_cloud.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
HIGH…stom_components/xiaomi_home/miot/specs/specv2entity.py0copyright (c) 2024 xiaomi corporation. the ownership and intellectual property rights of xiaomi home assistant integratiSTRING
Hyper-Verbose Identifiers96 hits · 86 pts
SeverityFileLineSnippetContext
LOWtest/test_spec.py59async def test_spec_random_parse_async(test_cache_path, test_lang):CODE
LOWtest/test_storage.py94async def test_multi_task_load_async(test_cache_path):CODE
LOWtest/test_storage.py115async def test_file_save_load_async(test_cache_path):CODE
LOWtest/test_network.py13async def test_network_monitor_loop_async():CODE
LOWtest/test_network.py17 async def on_network_status_changed(status: bool):CODE
LOWtest/test_mips.py81 async def on_mips_state_changed_async(key: str, state: bool):CODE
LOWtest/test_mips.py84 async def on_dev_list_changed_async(CODE
LOWtest/test_mips.py193 async def on_mips_state_changed_async(key: str, state: bool):CODE
LOWtest/test_cloud.py86async def test_miot_oauth_refresh_token(CODE
LOWtest/test_cloud.py138async def test_miot_cloud_get_nickname_async(CODE
LOWtest/test_cloud.py167async def test_miot_cloud_get_uid_async(CODE
LOWtest/test_cloud.py199async def test_miot_cloud_get_homeinfos_async(CODE
LOWtest/test_cloud.py245async def test_miot_cloud_get_devices_async(CODE
LOWtest/test_cloud.py297async def test_miot_cloud_get_devices_with_dids_async(CODE
LOWtest/test_cloud.py418async def test_miot_cloud_get_prop_async(CODE
LOWtest/test_cloud.py455async def test_miot_cloud_get_props_async(CODE
LOWtest/test_cloud.py494async def test_miot_cloud_set_prop_async(CODE
LOWtest/test_cloud.py545async def test_miot_cloud_action_async(CODE
LOWcustom_components/xiaomi_home/cover.py214 def _position_changed_handler(self, prop: MIoTSpecProperty,CODE
LOWcustom_components/xiaomi_home/media_player.py270 async def async_media_previous_track(self) -> None:CODE
LOWcustom_components/xiaomi_home/__init__.py87def migrate_service_unique_id(CODE
LOWcustom_components/xiaomi_home/__init__.py396async def async_remove_config_entry_device(CODE
LOWcustom_components/xiaomi_home/config_flow.py319 async def async_step_network_detect_config(CODE
LOWcustom_components/xiaomi_home/config_flow.py399 async def __show_network_detect_config_form(self, reason: str):CODE
LOWcustom_components/xiaomi_home/config_flow.py754 async def async_step_advanced_options(CODE
LOWcustom_components/xiaomi_home/config_flow.py803 async def async_step_devices_filter(CODE
LOWcustom_components/xiaomi_home/config_flow.py880 async def __show_devices_filter_form(self, reason: str):CODE
LOWcustom_components/xiaomi_home/config_flow.py1326 async def async_step_config_options(self, user_input=None):CODE
LOWcustom_components/xiaomi_home/config_flow.py1423 async def async_step_update_user_info(self, user_input=None):CODE
LOWcustom_components/xiaomi_home/config_flow.py1561 async def async_step_devices_filter(CODE
LOWcustom_components/xiaomi_home/config_flow.py1627 async def __show_devices_filter_form(self, reason: str):CODE
LOWcustom_components/xiaomi_home/config_flow.py1724 async def update_devices_done_async(self):CODE
LOWcustom_components/xiaomi_home/config_flow.py1740 async def async_step_update_trans_rules(self, user_input=None):CODE
LOWcustom_components/xiaomi_home/config_flow.py1776 async def async_step_update_lan_ctrl_config(self, user_input=None):CODE
LOWcustom_components/xiaomi_home/config_flow.py1839 async def async_step_network_detect_config(CODE
LOWcustom_components/xiaomi_home/config_flow.py1921 async def __show_network_detect_config_form(self, reason: str):CODE
LOWcustom_components/xiaomi_home/config_flow.py1956 async def async_step_config_confirm(self, user_input=None):CODE
LOWcustom_components/xiaomi_home/config_flow.py2163def _handle_network_detect_addr(CODE
LOWcustom_components/xiaomi_home/miot/miot_mips.py722 def __mips_sub_internal_pending_handler(self, ctx: Any) -> None:CODE
LOWcustom_components/xiaomi_home/miot/miot_mips.py816 def __mips_start_connect_tries(self) -> None:CODE
LOWcustom_components/xiaomi_home/miot/miot_mips.py842 def __get_next_reconnect_time(self) -> float:CODE
LOWcustom_components/xiaomi_home/miot/miot_mips.py1062 def __unreg_broadcast_external(self, topic: str) -> bool:CODE
LOWcustom_components/xiaomi_home/miot/miot_mips.py1415 async def get_action_group_list_async(CODE
LOWcustom_components/xiaomi_home/miot/miot_mips.py1427 async def exec_action_group_list_async(CODE
LOWcustom_components/xiaomi_home/miot/miot_mips.py1621 def __unreg_broadcast_external(self, topic) -> bool:CODE
LOWcustom_components/xiaomi_home/miot/miot_network.py332 def __call_network_info_change(CODE
LOWcustom_components/xiaomi_home/miot/miot_network.py338 async def __update_status_and_info_async(self) -> None:CODE
LOWcustom_components/xiaomi_home/miot/miot_lan.py911 async def __on_network_info_change_external_async(CODE
LOWcustom_components/xiaomi_home/miot/miot_lan.py1141 def __update_subscribe_option(self, options: dict) -> None:CODE
LOWcustom_components/xiaomi_home/miot/miot_storage.py605 async def user_cert_remaining_time_async(CODE
LOWcustom_components/xiaomi_home/miot/miot_client.py496 def hide_non_standard_entities(self) -> bool:CODE
LOWcustom_components/xiaomi_home/miot/miot_client.py501 def display_devices_changed_notify(self) -> list[str]:CODE
LOWcustom_components/xiaomi_home/miot/miot_client.py518 def display_devices_changed_notify(self, value: list[str]) -> None:CODE
LOWcustom_components/xiaomi_home/miot/miot_client.py945 def __request_refresh_auth_info(self, delay_sec: int) -> None:CODE
LOWcustom_components/xiaomi_home/miot/miot_client.py954 def __request_refresh_user_cert(self, delay_sec: int) -> None:CODE
LOWcustom_components/xiaomi_home/miot/miot_client.py1034 async def __on_network_status_changed(self, status: bool) -> None:CODE
LOWcustom_components/xiaomi_home/miot/miot_client.py1054 async def __on_mips_service_state_change(CODE
LOWcustom_components/xiaomi_home/miot/miot_client.py1096 async def __on_mips_cloud_state_changed(CODE
LOWcustom_components/xiaomi_home/miot/miot_client.py1134 async def __on_mips_local_state_changed(CODE
LOWcustom_components/xiaomi_home/miot/miot_client.py1180 async def __on_miot_lan_state_change(self, state: bool) -> None:CODE
36 more matches not shown…
Excessive Try-Catch Wrapping56 hits · 57 pts
SeverityFileLineSnippetContext
LOWcustom_components/xiaomi_home/__init__.py347 except Exception as err:CODE
MEDIUMcustom_components/xiaomi_home/config_flow.py1205def async_step_oauth(self, user_input=None):CODE
LOWcustom_components/xiaomi_home/config_flow.py392 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/config_flow.py479 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/config_flow.py543 except Exception as err:CODE
LOWcustom_components/xiaomi_home/config_flow.py564 except Exception as err:CODE
LOWcustom_components/xiaomi_home/config_flow.py579 except Exception as err:CODE
LOWcustom_components/xiaomi_home/config_flow.py646 except Exception as err:CODE
LOWcustom_components/xiaomi_home/config_flow.py722 except Exception as err:CODE
LOWcustom_components/xiaomi_home/config_flow.py1174 except Exception as err:CODE
LOWcustom_components/xiaomi_home/config_flow.py1247 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/config_flow.py1279 except Exception as err:CODE
LOWcustom_components/xiaomi_home/config_flow.py1453 except Exception as err:CODE
LOWcustom_components/xiaomi_home/config_flow.py1463 except Exception as err:CODE
LOWcustom_components/xiaomi_home/config_flow.py1914 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/config_flow.py2107 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/config_flow.py2179 except Exception:CODE
LOWcustom_components/xiaomi_home/config_flow.py2189 except Exception:CODE
LOWcustom_components/xiaomi_home/miot/miot_mips.py546 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/miot/miot_mips.py569 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/miot/miot_mips.py609 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/miot/miot_mips.py744 except Exception as err: # pylint: disable=broad-exception-caughtCODE
MEDIUMcustom_components/xiaomi_home/miot/miot_mips.py591def __mqtt_loop_handler(self) -> None:CODE
LOWcustom_components/xiaomi_home/miot/miot_network.py236 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/miot/miot_network.py293 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/miot/miot_network.py303 except Exception: # pylint: disable=broad-exception-caughtCODE
MEDIUMcustom_components/xiaomi_home/miot/miot_network.py208def get_network_status_async(self) -> bool:CODE
LOWcustom_components/xiaomi_home/miot/miot_lan.py282 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/miot/miot_lan.py597 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/miot/miot_lan.py1053 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/miot/miot_lan.py1197 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/miot/miot_lan.py1226 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/miot/miot_lan.py1267 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/miot/miot_lan.py1360 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/miot/miot_storage.py766 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/miot/miot_i18n.py87 except Exception as err: # pylint: disable=broad-exception-caughtCODE
MEDIUMcustom_components/xiaomi_home/miot/miot_client.py541def refresh_oauth_info_async(self) -> bool:CODE
MEDIUMcustom_components/xiaomi_home/miot/miot_client.py599def refresh_user_cert_async(self) -> bool:CODE
LOWcustom_components/xiaomi_home/miot/miot_client.py589 except Exception as err:CODE
LOWcustom_components/xiaomi_home/miot/miot_client.py747 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/miot/miot_client.py1331 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/miot/miot_client.py1341 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/miot/miot_client.py1461 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/miot/miot_client.py1692 except Exception as err: # pylint:disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/miot/miot_device.py872 except Exception: # pylint: disable=broad-exceptCODE
LOWcustom_components/xiaomi_home/miot/miot_spec.py389 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/miot/miot_spec.py594 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/miot/miot_spec.py861 except Exception as err:CODE
LOWcustom_components/xiaomi_home/miot/miot_spec.py872 except Exception as err:CODE
LOWcustom_components/xiaomi_home/miot/miot_spec.py888 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/miot/miot_spec.py962 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/miot/miot_spec.py1042 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/miot/miot_spec.py1130 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/miot/miot_spec.py1181 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/miot/miot_spec.py1350 except Exception as err: # pylint: disable=broad-exception-caughtCODE
LOWcustom_components/xiaomi_home/miot/miot_cloud.py781 except Exception as err: # pylint: disable=broad-exception-caughtCODE
Deep Nesting41 hits · 36 pts
SeverityFileLineSnippetContext
LOWtest/check_rule_format.py153CODE
LOWtest/check_rule_format.py268CODE
LOWcustom_components/xiaomi_home/cover.py67CODE
LOWcustom_components/xiaomi_home/cover.py111CODE
LOWcustom_components/xiaomi_home/sensor.py65CODE
LOWcustom_components/xiaomi_home/fan.py110CODE
LOWcustom_components/xiaomi_home/light.py108CODE
LOWcustom_components/xiaomi_home/humidifier.py103CODE
LOWcustom_components/xiaomi_home/media_player.py406CODE
LOWcustom_components/xiaomi_home/__init__.py133CODE
LOWcustom_components/xiaomi_home/notify.py97CODE
LOWcustom_components/xiaomi_home/vacuum.py111CODE
LOWcustom_components/xiaomi_home/text.py119CODE
LOWcustom_components/xiaomi_home/climate.py315CODE
LOWcustom_components/xiaomi_home/climate.py499CODE
LOWcustom_components/xiaomi_home/climate.py658CODE
LOWcustom_components/xiaomi_home/device_tracker.py84CODE
LOWcustom_components/xiaomi_home/config_flow.py2163CODE
LOWcustom_components/xiaomi_home/config_flow.py509CODE
LOWcustom_components/xiaomi_home/config_flow.py677CODE
LOWcustom_components/xiaomi_home/config_flow.py1444CODE
LOWcustom_components/xiaomi_home/miot/miot_mips.py678CODE
LOWcustom_components/xiaomi_home/miot/miot_network.py338CODE
LOWcustom_components/xiaomi_home/miot/miot_lan.py1141CODE
LOWcustom_components/xiaomi_home/miot/miot_storage.py127CODE
LOWcustom_components/xiaomi_home/miot/miot_storage.py194CODE
LOWcustom_components/xiaomi_home/miot/miot_storage.py605CODE
LOWcustom_components/xiaomi_home/miot/miot_client.py257CODE
LOWcustom_components/xiaomi_home/miot/miot_client.py380CODE
LOWcustom_components/xiaomi_home/miot/miot_client.py599CODE
LOWcustom_components/xiaomi_home/miot/miot_client.py643CODE
LOWcustom_components/xiaomi_home/miot/miot_client.py775CODE
LOWcustom_components/xiaomi_home/miot/miot_device.py465CODE
LOWcustom_components/xiaomi_home/miot/miot_device.py672CODE
LOWcustom_components/xiaomi_home/miot/miot_device.py1223CODE
LOWcustom_components/xiaomi_home/miot/miot_device.py1503CODE
LOWcustom_components/xiaomi_home/miot/miot_spec.py303CODE
LOWcustom_components/xiaomi_home/miot/miot_spec.py755CODE
LOWcustom_components/xiaomi_home/miot/miot_spec.py840CODE
LOWcustom_components/xiaomi_home/miot/miot_spec.py1400CODE
LOWcustom_components/xiaomi_home/miot/miot_cloud.py480CODE
Unused Imports19 hits · 19 pts
SeverityFileLineSnippetContext
LOWcustom_components/xiaomi_home/event.py48CODE
LOWcustom_components/xiaomi_home/cover.py48CODE
LOWcustom_components/xiaomi_home/sensor.py48CODE
LOWcustom_components/xiaomi_home/fan.py48CODE
LOWcustom_components/xiaomi_home/light.py48CODE
LOWcustom_components/xiaomi_home/number.py48CODE
LOWcustom_components/xiaomi_home/humidifier.py48CODE
LOWcustom_components/xiaomi_home/media_player.py48CODE
LOWcustom_components/xiaomi_home/__init__.py48CODE
LOWcustom_components/xiaomi_home/notify.py48CODE
LOWcustom_components/xiaomi_home/vacuum.py48CODE
LOWcustom_components/xiaomi_home/switch.py48CODE
LOWcustom_components/xiaomi_home/button.py48CODE
LOWcustom_components/xiaomi_home/text.py48CODE
LOWcustom_components/xiaomi_home/binary_sensor.py48CODE
LOWcustom_components/xiaomi_home/select.py48CODE
LOWcustom_components/xiaomi_home/water_heater.py48CODE
LOWcustom_components/xiaomi_home/climate.py48CODE
LOWcustom_components/xiaomi_home/device_tracker.py48CODE
Empty Error Handlers3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHcustom_components/xiaomi_home/config_flow.py2179except Exception:CODE
HIGHcustom_components/xiaomi_home/config_flow.py2189except Exception:CODE
HIGHcustom_components/xiaomi_home/miot/miot_network.py303except Exception: # pylint: disable=broad-exception-caughtCODE
Modern Structural Boilerplate9 hits · 9 pts
SeverityFileLineSnippetContext
LOWcustom_components/xiaomi_home/miot/miot_mips.py386 def update_mqtt_password(self, password: str) -> None:CODE
LOWcustom_components/xiaomi_home/miot/miot_lan.py317 def update_info(self, info: dict) -> None:CODE
LOWcustom_components/xiaomi_home/miot/miot_lan.py644 async def update_net_ifs_async(self, net_ifs: list[str]) -> None:CODE
LOWcustom_components/xiaomi_home/miot/miot_lan.py679 async def update_subscribe_option(self, enable_subscribe: bool) -> None:CODE
LOWcustom_components/xiaomi_home/miot/miot_spec.py840 async def set_spec_async(self, urn: str) -> None:CODE
LOWcustom_components/xiaomi_home/miot/miot_spec.py1063 async def set_spec_spec(self, urn_key: str) -> None:CODE
LOWcustom_components/xiaomi_home/miot/miot_spec.py1147 async def set_spec_async(self, urn: str) -> None:CODE
LOWcustom_components/xiaomi_home/miot/miot_spec.py1198 async def set_spec_async(self, urn: str) -> None:CODE
LOWcustom_components/xiaomi_home/miot/miot_cloud.py123 def set_redirect_url(self, redirect_url: str) -> None:CODE
Redundant / Tautological Comments3 hits · 4 pts
SeverityFileLineSnippetContext
LOWinstall.sh11# Check if config path exists.COMMENT
LOWcustom_components/xiaomi_home/miot/miot_i18n.py90 # Check if the file is a valid JSON fileCOMMENT
LOWcustom_components/xiaomi_home/miot/miot_spec.py965 # Check if the file is a valid fileCOMMENT
Slop Phrases2 hits · 4 pts
SeverityFileLineSnippetContext
MEDIUMcustom_components/xiaomi_home/translations/en.json24 "description": "## Usage Introduction\r\n### Network Detection Address\r\nUsed to check if the network iCODE
MEDIUMcustom_components/xiaomi_home/translations/en.json179 "description": "## Usage Introduction\r\n### Network Detection Address\r\nUsed to check if the network iCODE
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMcustom_components/xiaomi_home/miot/miot_lan.py950# The following methods SHOULD ONLY be called in the internal loopCOMMENT
AI Structural Patterns1 hit · 1 pts
SeverityFileLineSnippetContext
LOWcustom_components/xiaomi_home/miot/miot_device.py1391CODE
Over-Commented Block1 hit · 1 pts
SeverityFileLineSnippetContext
LOWcustom_components/xiaomi_home/miot/miot_error.py61 CODE_TIMEOUT = -10006COMMENT