Git Product home page Git Product logo

xiaomi's Introduction

Xiaomi WiFi Plug

This is a custom component for Home Assistant to integrate the Xiaomi Smart WiFi Socket (called Plug), Xiaomi Smart Power Strip and Xiaomi Chuangmi Plug V1.

Please follow the instructions on Retrieving the Access Token to get the API token to use in the configuration.yaml file.

Credits: Thanks to Rytilahti for all the work.

Features

  • On, Off
  • USB on, off (Chuangmi Plug V1 only)
  • Current state
  • Attributes
    • Temperature
    • Load (Power Strip only)

Setup

switch:
  - platform: xiaomi_miio
    name: Original Xiaomi Mi Smart WiFi Socket
    host: 192.168.130.59
    token: b7c4a758c251955d2c24b1d9e41ce47d
    model: chuangmi.plug.m1
  - platform: xiaomi_miio
    name: Xiaomi Mi Smart Power Strip
    host: 192.168.130.60
    token: 0ed0fdccb2d0cd718108f18a447726a6
    model: zimi.powerstrip.v2

Configuration variables:

  • host (Required): The IP of your light.
  • token (Required): The API token of your light.
  • name (Optional): The name of your light.
  • model (Optional): The model of your device. Valid values are chuangmi.plug.v1, qmi.powerstrip.v1, zimi.powerstrip.v2, chuangmi.plug.m1 and chuangmi.plug.v2. This setting can be used to bypass the device model detection and is recommended if your device isn't always available.

Platform services

Service switch/xiaomi_miio_set_power_mode (Power Strip only)

Set the power mode.

Service data attribute Optional Description
entity_id yes Only act on a specific xiaomi miio entity. Else targets all.
mode no Power mode, valid values are 'normal' and 'green'

xiaomi's People

Contributors

syssi avatar xavv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

xiaomi's Issues

Cannot import name device

Two comments:

1st: is it possible to rename the component? Because a lot of people already have the Xiaomi Gateway integrated - which uses the custom_components xiaomi.py

2nd: I get the following error:
2017-06-05 16:29:20 ERROR (Thread-6) [custom_components.switch.xiaomiplug] Got exception while fetching the state: cannot import name 'Device'
Steps I took:
a) put your custom_component/switch/xiaomi under HomeAssistant's custom_components/switch/xiaomi.py
b) rename xiaomi.py to xiaomiplug.py (due to the first point)

Is there anything I am doing wrong? What is with the folder "xiaomi" - where to put that?

Thanks

Merging AirQuality & its functionality back to python-mirobo

Hello there,

I have recently changed the python-mirobo to allow easier extension for other types of devices, would you be interested in getting the support for the plug & air purifier back to python-mirobo? I'm at the moment unsure how should it go with the cli tool, but I think we can manage to find a solution for that if you are interested.

continuous error

Hi, i keep on receiving this error in HA:

Error occurred loading configuration flow for integration xiaomi_miio: cannot import name 'Fan1C' from 'miio' (/usr/local/lib/python3.9/site-packages/miio/__init__.py)

any idea? i don't have any Fan1C device.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.