{"id":13438981,"url":"https://github.com/al-one/hass-xiaomi-miot","last_synced_at":"2025-05-13T16:07:14.404Z","repository":{"id":37633033,"uuid":"318182014","full_name":"al-one/hass-xiaomi-miot","owner":"al-one","description":"Automatic integrate all Xiaomi devices to HomeAssistant via miot-spec, support Wi-Fi, BLE, ZigBee devices. 小米米家智能家居设备接入Hass集成","archived":false,"fork":false,"pushed_at":"2025-05-09T09:34:15.000Z","size":3050,"stargazers_count":5233,"open_issues_count":725,"forks_count":751,"subscribers_count":34,"default_branch":"master","last_synced_at":"2025-05-09T20:22:50.638Z","etag":null,"topics":["custom-component","home-assistant","homeassistant","iot","miio","miot","miot-spec","smart-home","xiaoai","xiaomi","xiaomi-miot"],"latest_commit_sha":null,"homepage":"https://miot-spec.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/al-one.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["al-one"],"custom":["https://nowpayments.io/donation/miot","https://link3.io/hassio.bit"]}},"created_at":"2020-12-03T12:13:13.000Z","updated_at":"2025-05-09T09:34:18.000Z","dependencies_parsed_at":"2023-09-29T02:26:01.917Z","dependency_job_id":"568a9dbd-a8c6-4238-8d17-9f0841f3b2f7","html_url":"https://github.com/al-one/hass-xiaomi-miot","commit_stats":{"total_commits":1944,"total_committers":95,"mean_commits":20.46315789473684,"dds":0.0761316872427984,"last_synced_commit":"616e2794604e3c6bb60c89dad79a2fb3e84eba29"},"previous_names":[],"tags_count":134,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al-one%2Fhass-xiaomi-miot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al-one%2Fhass-xiaomi-miot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al-one%2Fhass-xiaomi-miot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al-one%2Fhass-xiaomi-miot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/al-one","download_url":"https://codeload.github.com/al-one/hass-xiaomi-miot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253979991,"owners_count":21994041,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["custom-component","home-assistant","homeassistant","iot","miio","miot","miot-spec","smart-home","xiaoai","xiaomi","xiaomi-miot"],"created_at":"2024-07-31T03:01:10.168Z","updated_at":"2025-05-13T16:07:14.345Z","avatar_url":"https://github.com/al-one.png","language":"Python","funding_links":["https://github.com/sponsors/al-one","https://nowpayments.io/donation/miot","https://link3.io/hassio.bit"],"categories":["HarmonyOS","Python","Custom Integrations"],"sub_categories":["Windows Manager","🏷️ Vendor \u0026 brand"],"readme":"[![version](https://img.shields.io/github/manifest-json/v/al-one/hass-xiaomi-miot?filename=custom_components%2Fxiaomi_miot%2Fmanifest.json)](https://github.com/al-one/hass-xiaomi-miot/releases/latest)\n[![releases](https://img.shields.io/github/downloads/al-one/hass-xiaomi-miot/total)](https://github.com/al-one/hass-xiaomi-miot/releases)\n[![stars](https://img.shields.io/github/stars/al-one/hass-xiaomi-miot)](https://github.com/al-one/hass-xiaomi-miot/stargazers)\n[![issues](https://img.shields.io/github/issues/al-one/hass-xiaomi-miot)](https://github.com/al-one/hass-xiaomi-miot/issues)\n[![HACS](https://img.shields.io/badge/HACS-Default-orange.svg)](https://hacs.xyz)\n\n# Xiaomi Miot For HomeAssistant\n\nEnglish | [简体中文](https://github.com/al-one/hass-xiaomi-miot/blob/master/README_zh.md)\n\n[MIoT-Spec](https://iot.mi.com/new/doc/design/spec/overall): The protocol specification for Xiaomi IoT devices, is a standard designed by the Xiaomi IoT platform to describe the function definition of hardware products according to the networking mode of hardware products, the characteristics of product functions, the characteristics of user usage scenarios and the user's requirements for hardware product use experience specification.\n\nThis component uses the **miot** protocol to automatically integrate Xiaomi devices into [HomeAssistant](https://www.home-assistant.io), and currently supports most Xiaomi IoT devices. And it supports HA Web UI, and you can easily integrate Xiaomi devices into HA without configuring yaml.\n\n![hass-xiaomi-miot-configs](https://user-images.githubusercontent.com/4549099/142151697-5188ea2d-0aad-4778-8b60-b949bcc410bb.png)\n\n\n\u003ca name=\"installing\"\u003e\u003c/a\u003e\n## Installation\n\n#### Method 1: [HACS](https://hacs.xyz)\n- First installation\n    \u003e HACS \u003e Integrations \u003e ➕ EXPLORE \u0026 DOWNLOAD REPOSITORIES \u003e [`Xiaomi Miot Auto`](https://my.home-assistant.io/redirect/hacs_repository/?owner=al-one\u0026repository=hass-xiaomi-miot) \u003e DOWNLOAD THIS REPOSITORY\n- Update component\n    \u003e HACS \u003e Integrations \u003e [`Xiaomi Miot Auto`](https://my.home-assistant.io/redirect/hacs_repository/?owner=al-one\u0026repository=hass-xiaomi-miot) \u003e UPDATE / Redownload\n\n#### Method 2: Manually installation via Samba / SFTP\n\u003e Download and copy `custom_components/xiaomi_miot` folder to `custom_components` folder in your HomeAssistant config folder\n\n#### Method 3: Onkey shell via SSH / Terminal \u0026 SSH add-on\n```shell\nwget -O - https://get.hacs.vip | DOMAIN=xiaomi_miot bash -\n\n# Or\n\nwget -O - https://raw.githubusercontent.com/al-one/hass-xiaomi-miot/master/install.sh | ARCHIVE_TAG=latest bash -\n```\n\n#### Method 4: shell_command service\n1. Copy this code to file `configuration.yaml`\n    ```yaml\n    shell_command:\n      update_xiaomi_miot: |-\n        wget -O - https://get.hacs.vip | DOMAIN=xiaomi_miot bash -\n    ```\n2. Restart HA core\n3. Call this [`service: shell_command.update_xiaomi_miot`](https://my.home-assistant.io/redirect/developer_call_service/?service=shell_command.update_xiaomi_miot) in Developer Tools\n2. Restart HA core again\n\n\n## Config\n\n\u003e [⚙️ Configuration](https://my.home-assistant.io/redirect/config) \u003e Devices and Services \u003e [🧩 Integrations](https://my.home-assistant.io/redirect/integrations) \u003e [➕ Add Integration](https://my.home-assistant.io/redirect/config_flow_start?domain=xiaomi_miot) \u003e 🔍 Search `Xiaomi Miot Auto`\n\nOr click: [![Add Integration](https://my.home-assistant.io/badges/config_flow_start.svg)](https://my.home-assistant.io/redirect/config_flow_start?domain=xiaomi_miot)\n\n### Add devices using Mi Account:\nStarting from the v0.4.4 version, the component has added support for selecting the connection device mode when integrated by account:\n- **Automatic**: The component will regularly update [the devices that support miot-spec in LAN](https://github.com/al-one/hass-xiaomi-miot/blob/master/custom_components/xiaomi_miot/core/miot_local_devices.py), and automatically use the local connection for the supported devices (recommended)\n- **Local**: All devices filtered by the integrated configuration will use local connection. If you check the devices that do not support miot in LAN, they will be unavailable\n- **Cloud**: All devices filtered by the integrated configuration will use cloud connection. It is recommended that miio, BLE, ZigBee devices use this mode\n\n### Add device using host/token:\nSuitable for devices support miot-spec protocol in LAN\n\n### Config Xiaomi Cloud:\n\n\u003e Config Xiaomi cloud for the devices **integrated by host/token**\n\n```yaml\n# configuration.yaml\nxiaomi_miot:\n  username: xiaomi_username\n  password: xiaomi_password\n  # server_country: cn # Location of xiaomi cloud: cn(default), de, i2, ru, sg, tw, us\n  # http_timeout: 15   # Timeout (seconds) for requesting the xiaomi apis\n```\n\n\u003e [⚙️ Configuration](https://my.home-assistant.io/redirect/config) \u003e Devices and Services \u003e [🧩 Integrations](https://my.home-assistant.io/redirect/integrations) \u003e Xiaomi Miot Auto \u003e Options \u003e ☑️ Enable miot cloud\n\n### Translations\n\n\u003e Looking forward to your [contribution](https://github.com/al-one/hass-xiaomi-miot/edit/master/custom_components/xiaomi_miot/core/translation_languages.py).\n\n```yaml\n# configuration.yaml\nxiaomi_miot:\n  language: zh # Using the built-in dictionary, currently only `zh` is supported\n  # https://github.com/al-one/hass-xiaomi-miot/blob/master/custom_components/xiaomi_miot/core/translation_languages.py\n  translations:\n    # Global dictionary\n    idle: '空闲'\n    busy: '工作中'\n    # Dictionary for specifying fan modes\n    fan.mode:\n      straight wind: '直吹模式'\n      natural wind: '自然风'\n    # Dictionary for specifying the drying modes of the washer\n    washer.drying_level:\n      moist: '微湿'\n      extra: '特干'\n```\n\n\n### [Customize entity](https://www.home-assistant.io/docs/configuration/customizing-devices/#customizing-entities)\n\n```yaml\n# configuration.yaml\nhomeassistant:\n  customize: !include customize.yaml\n\n# Customize via device model\nxiaomi_miot:\n  # https://github.com/al-one/hass-xiaomi-miot/blob/master/custom_components/xiaomi_miot/core/device_customizes.py\n  device_customizes:\n    chuangmi.plug.212a01:\n      miot_local: true\n      chunk_properties: 7\n\n\n# Customize via parent entity\n# customize.yaml\ndomain.your_entity_id:\n  miot_local: true        # Force to read and write data in LAN (integrate by account)\n  miot_cloud: true        # Enable miot cloud for entity (read, write, action)\n  miot_cloud_write: true  # Enable miot cloud (only write)\n  miot_cloud_action: true # Enable miot cloud (only action)\n  check_lan: true         # Check LAN connection in cloud mode\n  miio_properties: power,battery # Get miio properties to state attributes\n  miio_cloud_props: prop.power,event.dev_online\n\n# Custom sub entities\ndomain.parent_entity_id:\n  sensor_properties: temperature,humidity,illumination # Miot properties\n  binary_sensor_properties: is_volume_muted,any_boolen_property\n  switch_properties: on,power\n  number_properties: volume\n  select_properties: mode\n  fan_properties: mode,fan_level\n  cover_properties: motor_control\n\nlight.your_entity_id:\n  color_temp_reverse: false # Reverse color temperature (Requires reload config entry)\n  yeelight_smooth_on:  2000 # milliseconds (Only for Yeelights in local mode)\n  yeelight_smooth_off: 3000 # milliseconds (Only for Yeelights in local mode)\n\nclimate.your_entity_id:\n  bind_sensor: sensor.temperature_entity,sensor.humidity_entity # Sensor entities\n\ncamera.your_entity_id:\n  video_attribute: 1   # https://github.com/al-one/hass-xiaomi-miot/issues/11#issuecomment-773054167\n  keep_streaming: true # Continuously update stream address\n\ncover.your_entity_id:\n  closed_position: 5     # Change cover state to closed when position \u003c= 5%\n  deviated_position: 2   # Current position deviation 2% -\u003e 0%, 98% -\u003e 100%\n  motor_reverse: true    # Reverse motor state (Requires reload config entry)\n  position_reverse: true # Reverse motor position (Requires reload config entry)\n  open_texts: Open,Up\n  close_texts: Close,Down\n\nmedia_player.mitv_entity_id:\n  bind_xiaoai: media_player.xiaoai_entity_id # Bind xiaoai speaker for turn on TV\n\ndomain.your_entity_id_xxxx:\n  interval_seconds: 30 # Seconds between each update state (Requires reload config entry)\n  chunk_properties: 10 # Chunk miot properties on update state (LAN)\n  reverse_state: true  # Reverse the On/Off state of a binary sensor\n```\n\n### Filter entity attributes\n\n\u003e Too many entity attributes will make your HA's database very large. If some entity attributes are useless to you, you can configure `exclude_state_attributes` to ignore them.\n\n```yaml\n# configuration.yaml\nxiaomi_miot:\n  exclude_state_attributes:\n    - miot_type\n    - stream_address\n    - motion_video_latest\n```\n\n### YAML configuration reloading\nThis component has added support for configuration reloading (to avoid having to restart [HomeAssistant](https://www.home-assistant.io) instance after a YAML configuration change):\n\u003e [🔨 Developer tools](https://my.home-assistant.io/redirect/developer_states) \u003e [YAML Configuration](https://my.home-assistant.io/redirect/server_controls) \u003e YAML configuration reloading \u003e 🔍 Look for `Xiaomi Miot Auto` (almost at the bottom of the list)\n\n\n## [Supported Devices](https://github.com/al-one/hass-xiaomi-miot/issues/12)\n\n- 🔌 [outlet](https://home.miot-spec.com/s/plug) / [switch](https://home.miot-spec.com/s/switch)\n- 💡 [light](https://home.miot-spec.com/s/light)\n- ❄️ [air-conditioner](https://home.miot-spec.com/s/aircondition) / [air-conditioner-outlet](https://home.miot-spec.com/s/acpartner) / [ir-aircondition-control](https://home.miot-spec.com/s/miir.aircondition)\n- 🌀 [fan](https://home.miot-spec.com/s/fan) / [ceiling-fan](https://home.miot-spec.com/s/ven_fan)\n- 🛀 [bath-heater](https://home.miot-spec.com/s/bhf_light) / 🔥 [heater](https://home.miot-spec.com/s/heater) / [thermostat](https://home.miot-spec.com/s/airrtc)\n- 📷 [camera](https://home.miot-spec.com/s/camera) / [video-doorbell](https://home.miot-spec.com/s/cateye) [❓️](https://github.com/al-one/hass-xiaomi-miot/issues/100#issuecomment-903078604)\n- 📺 [television](https://home.miot-spec.com/s/tv) / 📽️ [projector](https://home.miot-spec.com/s/projector) / [tv-box](https://home.miot-spec.com/s/tvbox)\n- 🗣️ [intelligent-speaker](https://home.miot-spec.com/s/wifispeaker) [❓️](https://github.com/al-one/hass-xiaomi-miot/issues/100#issuecomment-885989099)\n- 🎮️ [ir-remote-control](https://home.miot-spec.com/s/chuangmi.remote) [❓️](https://github.com/al-one/hass-xiaomi-miot/commit/fbcc8063783e53b9480574536a034d338634f4e8#commitcomment-56563663)\n- 🔐 [lock](https://home.miot-spec.com/s/lock) / 🚪 [door](https://home.miot-spec.com/s/door)\n- 👕 [washer](https://home.miot-spec.com/s/washer) / [dryer](https://home.miot-spec.com/s/dry) / [fridge](https://home.miot-spec.com/s/fridge)\n- 🚰 [water-purifier](https://home.miot-spec.com/s/waterpuri) / [kettle](https://home.miot-spec.com/s/kettle)\n- ♻️ [air-purifier](https://home.miot-spec.com/s/airpurifier) / [air-fresh](https://home.miot-spec.com/s/airfresh) / [hood](https://home.miot-spec.com/s/hood)\n- 🌡 [temperature-humidity-sensor](https://home.miot-spec.com/s/sensor_ht) / [submersion-sensor](https://home.miot-spec.com/s/flood) / [smoke-sensor](https://home.miot-spec.com/s/sensor_smoke)\n- 🥘 [cooker](https://home.miot-spec.com/s/cooker) / [pressure-cooker](https://home.miot-spec.com/s/pre_cooker) / [electric-steamer](https://home.miot-spec.com/s/esteamer)\n- 🍲 [induction-cooker](https://home.miot-spec.com/s/ihcooker) / [oven](https://home.miot-spec.com/s/oven) / [microwave](https://home.miot-spec.com/s/microwave)\n- 🍗 [air-fryer](https://home.miot-spec.com/s/fryer) / [multifunction-cooking-pot](https://home.miot-spec.com/s/mfcp)\n- 🍵 [health-pot](https://home.miot-spec.com/s/health_pot) / ☕️ [coffee-machine](https://home.miot-spec.com/s/coffee)\n- 🍹 [juicer](https://home.miot-spec.com/s/juicer) / [fruit-vegetable-purifier](https://home.miot-spec.com/s/f_washer)\n- ♨️ [water-heater](https://home.miot-spec.com/s/waterheater) / [dishwasher](https://home.miot-spec.com/s/dishwasher) / [foot-bath](https://home.miot-spec.com/s/foot_bath)\n- 🦠 [steriliser](https://home.miot-spec.com/s/steriliser) / [towel-rack](https://home.miot-spec.com/s/.tow)\n- 🪟 [curtain](https://home.miot-spec.com/s/curtain) / [window-opener](https://home.miot-spec.com/s/wopener) / [airer](https://home.miot-spec.com/s/airer)\n- 🧹 [vacuum](https://home.miot-spec.com/s/vacuum) / [mopping-machine](https://home.miot-spec.com/s/.mop)\n- 💦 [humidifier](https://home.miot-spec.com/s/humidifier) / [dehumidifier](https://home.miot-spec.com/s/derh) / [diffuser](https://home.miot-spec.com/s/diffuser)\n- 🍃 [air-monitor](https://home.miot-spec.com/s/airmonitor) / 🪴 [plant-monitor](https://home.miot-spec.com/s/plantmonitor)\n- 🛏 [bed](https://home.miot-spec.com/s/bed) / [blanket](https://home.miot-spec.com/s/blanket) / 😴 [sleep-monitor](https://home.miot-spec.com/s/lunar)\n- 💺 [chair](https://home.miot-spec.com/s/chair) / [table](https://home.miot-spec.com/s/desk)\n- 💆 [massager](https://home.miot-spec.com/s/massage) / [magic-touch](https://home.miot-spec.com/s/magic_touch)\n- 🏃 [walking-pad](https://home.miot-spec.com/s/walkingpad) / [treadmill](https://home.miot-spec.com/s/treadmill)\n- 🚽 [toilet](https://home.miot-spec.com/s/toilet) / [cat-toilet](https://home.miot-spec.com/s/litter_box) / 🪥 [toothbrush](https://home.miot-spec.com/s/toothbrush)\n- 🐱 [pet-feeder](https://home.miot-spec.com/s/feeder) / ⛲ [pet-drinking-fountain](https://home.miot-spec.com/s/pet_waterer) / 🐟 [fish-tank](https://home.miot-spec.com/s/fishbowl)\n- 🦟 [mosquito-dispeller](https://home.miot-spec.com/s/mosq) / [germicidal-lamp](https://home.miot-spec.com/s/s_lamp)\n- 🚘 [rearview-mirror](https://home.miot-spec.com/s/rv_mirror) / [head-up-display](https://home.miot-spec.com/s/hud)\n- ⌚️ [watch](https://home.miot-spec.com/s/watch) / [bracelet](https://home.miot-spec.com/s/bracelet)\n- 🚶 [motion-sensor](https://home.miot-spec.com/s/motion) / 🧲 [magnet-sensor](https://home.miot-spec.com/s/magnet) [❓️](https://github.com/al-one/hass-xiaomi-miot/issues/100#issuecomment-909031222)\n- 📳 [vibration-sensor](https://home.miot-spec.com/s/vibration)\n- 🌐 [router](https://home.miot-spec.com/s/router) / 🖨 [printer](https://home.miot-spec.com/s/printer)\n\n\n### Unsupported devices\n\n\u003e This component uses the polling method to obtain the device state, so it cannot listen the events of some devices in real time.\n\n- Wireless Switch (like: [lumi.sensor_switch.v1](https://home.miot-spec.com/s/lumi.sensor_switch.v1) / [lumi.remote.b686opcn01](https://home.miot-spec.com/s/lumi.remote.b686opcn01))\n- Motion Sensor (like: [lumi.sensor_motion.v1](https://home.miot-spec.com/s/lumi.sensor_motion.v1))\n- Window and Door Sensor (like: [lumi.sensor_magnet.v1](https://home.miot-spec.com/s/lumi.sensor_magnet.v1))\n\n\n## Services\n\n\u003e Since the HA support service response has been for some time, this component no longer triggers events starting from v0.7.18.\n\n#### [`xiaomi_miot.set_property`](https://my.home-assistant.io/redirect/developer_call_service/?service=xiaomi_miot.set_property)\n```yaml\nservice: xiaomi_miot.set_property\ndata:\n  entity_id: camera.isa_hlc7_xxxx\n  field: camera_control.on\n  value: true\n```\n\n#### [`xiaomi_miot.set_miot_property`](https://my.home-assistant.io/redirect/developer_call_service/?service=xiaomi_miot.set_miot_property)\n```yaml\nservice: xiaomi_miot.set_miot_property\ndata:\n  entity_id: camera.isa_hlc7_xxxx\n  siid: 2\n  piid: 1\n  value: true\n```\n\n#### [`xiaomi_miot.get_properties`](https://my.home-assistant.io/redirect/developer_call_service/?service=xiaomi_miot.get_properties)\n```yaml\nservice: xiaomi_miot.get_properties\ndata:\n  entity_id: camera.isa_hlc7_1ab7\n  mapping:\n    - siid: 2\n      piid: 1\n    - siid: 3\n      piid: 2\n  update_entity: true # Update to entity state attributes\n```\n\n#### [`xiaomi_miot.call_action`](https://my.home-assistant.io/redirect/developer_call_service/?service=xiaomi_miot.call_action)\n```yaml\nservice: xiaomi_miot.call_action\ndata:\n  entity_id: vacuum.dreame_p2259_entity_id\n  siid: 4 # vacuum-extend\n  aiid: 1 # start-clean\n  params:\n    - 18 # piid: 1 - work-mode\n    - '{\"selects\":[[7,1,0,2,1]]}' # piid: 10 - clean-extend-data\n```\n\n#### [`xiaomi_miot.send_command`](https://my.home-assistant.io/redirect/developer_call_service/?service=xiaomi_miot.send_command)\n```yaml\nservice: xiaomi_miot.send_command\ndata:\n  entity_id: switch.your_entity_id\n  method: set_power\n  params:\n    - on\n```\n\n#### [`xiaomi_miot.get_token`](https://my.home-assistant.io/redirect/developer_call_service/?service=xiaomi_miot.get_token)\n```yaml\nservice: xiaomi_miot.get_token\ndata:\n  name: Light # Keyword of device name in Mihome / IP / Model.\n```\n\n#### [`xiaomi_miot.intelligent_speaker`](https://my.home-assistant.io/redirect/developer_call_service/?service=xiaomi_miot.intelligent_speaker)\n```yaml\nservice: xiaomi_miot.intelligent_speaker\ndata:\n  entity_id: media_player.xiaoai_lx04_xxxx\n  text: Turn on the light\n  execute: true # Execute text directive.\n  silent: true  # Silent execution.\n```\n\n#### [`xiaomi_miot.xiaoai_wakeup`](https://my.home-assistant.io/redirect/developer_call_service/?service=xiaomi_miot.xiaoai_wakeup)\n```yaml\nservice: xiaomi_miot.xiaoai_wakeup\ndata:\n  entity_id: media_player.xiaoai_lx04_xxxx\n```\n\n#### [`xiaomi_miot.renew_devices`](https://my.home-assistant.io/redirect/developer_call_service/?service=xiaomi_miot.renew_devices)\n```yaml\nservice: xiaomi_miot.renew_devices\ndata:\n  username: 80001234 # Xiaomi Account ID / Email / Phone\n```\n\n#### [`xiaomi_miot.request_xiaomi_api`](https://my.home-assistant.io/redirect/developer_call_service/?service=xiaomi_miot.request_xiaomi_api)\n```yaml\nservice: xiaomi_miot.request_xiaomi_api\ndata:\n  entity_id: sensor.your_entity_id\n  api: /v2/plugin/fetch_plugin\n  data:\n    latest_req:\n      api_version: 10070\n      plugins:\n        - model: brand.device.model\n```\n\n\u003e [More services](https://github.com/al-one/hass-xiaomi-miot/blob/master/custom_components/xiaomi_miot/services.yaml)\n\n\n## Debug\n\n### Get Entity State Attributes\n\n\u003e [🔨 Developer tools](https://my.home-assistant.io/redirect/developer_states) \u003e [ℹ️ State](https://my.home-assistant.io/redirect/developer_states) \u003e 🔍 Filter Entity\n\n### [Get Debug Logs](https://www.home-assistant.io/integrations/logger)\n\n```yaml\n# configuration.yaml\nlogger:\n  default: warning\n  logs:\n    custom_components.xiaomi_miot: debug\n```\n\n\u003e [⚙️ Configuration](https://my.home-assistant.io/redirect/config) \u003e [⚙️ System](https://my.home-assistant.io/redirect/system_dashboard) \u003e [✍️ Logs](https://my.home-assistant.io/redirect/logs)\n\n\n## Obtain miio token\n- Use HomeAssistant Service\n  1. Goto HomeAssistant service developer tool [![](https://my.home-assistant.io/badges/developer_services.svg)](https://my.home-assistant.io/redirect/developer_services/)\n  2. Select [`xiaomi_miot.get_token`](https://my.home-assistant.io/redirect/developer_call_service/?service=xiaomi_miot.get_token), Enter the keyword of device name\n  3. Find the token from the HA notifications\n- Use MiHome mod by [@vevsvevs](https://github.com/custom-components/ble_monitor/issues/7#issuecomment-595874419)\n  1. Down apk from [СКАЧАТЬ ВЕРСИЮ 7.x.x](https://www.vevs.me/2017/11/mi-home.html) and install\n  2. Start Mihome APP \u003e Profile \u003e Experimental features\n  3. Check on `Write custom log files` and `Enable app's debug mode`\n  4. Find the token from `vevs/logs/misc/devices.txt` after restart app\n- [Xiaomi Cloud Tokens Extractor](https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor)\n  1. Download and run [token_extractor.exe](https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor/blob/master/token_extractor.exe) for Windows or install [for Python](https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor#other-platforms)\n  2. Enter username, password and your server region\n  3. Extracts tokens from your cloud account. Also reveals the bind_key for BT devices\n\n\n## Thanks\n\n- [PyCharm](https://www.jetbrains.com/pycharm/)\n- [Dler](https://dler.pro/auth/register?affid=130833) (10% Discount coupon for new user: `CXVbfhHuSRsi`)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fal-one%2Fhass-xiaomi-miot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fal-one%2Fhass-xiaomi-miot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fal-one%2Fhass-xiaomi-miot/lists"}