dentra/esphome-components

platform: miot_mccgq02hl

andrewbeyou88 opened this issue · 3 comments

 Hi, i am using "ESPHome Current version: 2022.11.5". I just updated and i was looking to integrate one of Xiaomi mccgq02hl sensors in my ESP32 bluetooth tracker.
 I am not sure if i am doying it wrong or is some incompatibility issue. With this ESP32 i have succesfully integrated "platform: atc_mithermometer" sensors, yet i have these door sensors that i never managed to integrate.

The error i got is: "Failed config

binary_sensor.miot_mccgq02hl: [source /config/esphome/bt-scanner.yaml:90]"
[opening] is an invalid option for [binary_sensor.miot_mccgq02hl]. Please check the indentation.
opening:
name: Door sensor open

This is my ESP configuration:

  • platform: miot_mccgq02hl
    name: mccgq02hl
    mac_address: E4:AA:EC:36:D9:3A
    bindkey: "####"
    battery_level:
    name: "Door sensor battery level"
    light:
    name: "Door sensor light"
    opening:
    name: "Door sensor open"

DONE!
i erase
"opening:
name: "Door sensor open"
and just added
"device_class: opening"

  • platform: miot_mccgq02hl
    name: mccgq02hl
    mac_address: E4:AA:EC:36:D9:3A
    bindkey: "####"
    battery_level:
    name: "Door sensor battery level"
    light:
    name: "Door sensor light"
    device_class: opening

My component do not support opening configuration option. You can look documentation for all additional options here https://github.com/dentra/esphome-components/tree/master/components/miot_mccgq02hl