How to E-Ink Xiaomi BLE connection in Hassio ESPHOME?

Hello. I’m ESPhome Lover

I have E-ink Xiaomi Temperature and Humidity BLE Device.

and I found Genius Develpers integrates this item to ESPHome BLE relay connection

But I don’t know How to integrate this.

I use Hassio ESPHome and I used platform

https://github.com/esphome/esphome/pull/664/commits/80b419cba1b5619c257019fe5d54c640b95116d4

  • platform: xiaomi_lywsd02
    mac_address: 3F:5B:7D:80:EC:DD
    temperature:
    name: “Bathroom_in Temperature”
    humidity:
    name: “Bathroom_in Humidity”

but can’t compile …

this docs gave me a hints, but I don’t know how to…

Someone has a clue to integrate this item ?

I always thanks to ESPHome developers especially Otto Winter.

Have a nice day and Happy Esphoming : )

I did it myself : ) Thx to everyone who developed this code.

I did it this way

and then round this

here is my ESPhome File

sensor:
  - platform: xiaomi_mijia
    mac_address: 4C:65:A8:DE:D3:1D
    temperature:
      name: "Lounge Temperature"
      unit_of_measurement : "°C"
    humidity:
      name: "Lounge Humidity"
      unit_of_measurement : "%"
    battery_level:
      name: "Lounge Battery Level"
  - platform: wifi_signal
    name: 'Bluetooth Bridge Wifi Signal 199'
    update_interval: 10s
  - platform: uptime
    name: 'Bluetooth Bridge Uptime 199'
    
  - platform: xiaomi_miflora
    mac_address: C4:7C:8D:6A:6F:30    
    temperature:
      name: "MiFlora Temperature"
    moisture:
      name: "MiFlora Moisture"
    illuminance:
      name: "MiFlora Illuminance"
    conductivity:
      name: "MiFlora Soil Conductivity"
    battery_level:
      name: "MiFlora Battery Level"
time:
  - platform: homeassistant
    on_time:
      - seconds: 0
        minutes: 0
        hours: 4
        days_of_week: MON-SUN
        then:
           - switch.toggle: restartit
      - seconds: 0
        minutes: 0
        hours: 16
        days_of_week: MON-SUN
        then:
           - switch.toggle: restartit
switch:
  - platform: restart
    name: "Bluetooth Restart"
    id: restartit

needed to add the restart has not miss a beat

Thank you for your kind yaml codes, but I did it new e-ink xiaomi model lywsd02

looks there a github open

think it just a wait and see

could you share how you fixxed it? thankyou