3 Star 22 Fork 4

席理加 / sensor.mitemp_bt2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 3.46 KB
一键复制 编辑 原始数据 按行查看 历史
席理加 提交于 2020-10-29 16:00 . 更新v0.2.1版本源代码

English | 简体中文

Xiaomi Mijia BLE Temperature Hygrometer 2

GitHub Release hacs_badge

This is a custom component for home assistant to use bluetooth adapter directly integrate the Xiaomi Mijia BLE Temperature Hygrometer (LYWSDCGQ/01ZM) and Mijia BLE Temperature Hygrometer 2 (LYWSD03MMC).

Auto discovery supported without any configuration from v0.2.0-dev release.

No Bluetooth Gateway required.

LYWSD03MMC LYWSDCGQ/01ZM
LYWSD03MMC LYWSDCGQ/01ZM

Requirements

  • Supported & tested on HassOS 4.13 (HassOS Release-4 build 13 (Stable))
    • Warning: HassOS 4.14 has BLE bugs need fix, BLE devices can not be connected.
    • Other versions need to be tested
  • Hardware need bluetooth adapter and be actived, tested on Raspberry PI 3 Model B
    • Other hardwares need to be tested

Supported devices

Name Model Model no.
Xiaomi Mijia BLE Temperature Hygrometer LYWSDCGQ/01ZM
Xiaomi Mijia BLE Temperature Hygrometer 2 LYWSD03MMC

Features

Mijia BLE Temperature Hygrometer (LYWSDCGQ/01ZM)

  • Attributes
    • temperature
    • humidity
    • battery

Mijia BLE Temperature Hygrometer 2 (LYWSD03MMC)

  • Attributes
    • temperature
    • humidity
    • battery

Install

You can install this custom component by adding this repository (https://github.com/leonxi/mitemp_bt2) to HACS in the settings menu of HACS first. You will find the custom component in the integration menu afterwards, look for 'Xiaomi Mijia BLE Temperature Hygrometer 2 Integration'. Alternatively, you can install it manually by copying the custom_component folder to your Home Assistant configuration folder.

Setup (Optional)

From v0.2.0-dev releases, it will auto discovery without any configuration.

# configuration.yaml

sensor:
  - platform: mitemp_bt2
    mac: 'A4:C1:38:AA:AA:AA'
    mode: 'LYWSD03MMC'
    name: book room
    period: 60
  - platform: mitemp_bt2
    mac: 'A4:C1:38:FF:FF:FF'
    mode: 'LYWSD03MMC'
    name: living room
    period: 60

Configuration variables:

  • mac (Required): The MAC of your device.
  • mode (Optional): The mode of your device. Default LYWSD03MMC
  • name (Optional): The name of your device.
  • period (Optional): The scan period of your device. Default 300 seconds.

Panel Sample

LYWSD03MMC_PANEL_SHOW

Todo

  • Integration Options
    • (Supported) Add auto discovery option, to control enable or disable discovery
    • (Supported) Add period option, to control period of fetching devices' data, default period is 15 minutes. Avoid frequent access to Bluetooth devices, resulting in high power consumption of them.
  • Known issues
    • (Fixed) When installation, discoverred devices can not be displayed, and set their own areas.
    • (Fixed) In devices list, area or name can not be modified.
Python
1
https://gitee.com/leon_xi/mitemp_bt2.git
git@gitee.com:leon_xi/mitemp_bt2.git
leon_xi
mitemp_bt2
sensor.mitemp_bt2
master

搜索帮助