Xiaomi Mi BLE Temp sensor not registering on HA

Hi, I have this Xiaomi Mi BLE Temp & Humidity sensor.

I am running home assistant on a Raspberry Pi4.

Versions:
Home Assistant Core 2022.6.0

Home Assistant Supervisor 2022.05.3

Home Assistant OS 8.1

I added the following to my configuration.yaml

- platform: mitemp_bt
    mac: 'A4:C1:38:A7:C9:1A'
    name: Living Room Temp
    force_update: true
    median: 1
    cache_value: 10
    monitored_conditions:
      - temperature

I found the MAC address by scanning using an Android app.

On the dashboard it shows that the sensor value is ‘unknown’ and in logs I get this:

2022-06-02 16:15:54 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

2022-06-02 16:15:54 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration sonoff which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

2022-06-02 16:16:43 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.living_room_temp_temperature fails

Traceback (most recent call last):

File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 515, in async_update_ha_state

await self.async_device_update()

File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 743, in async_device_update

raise exc

File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run

result = self.fn(*self.args, **self.kwargs)

File "/usr/src/homeassistant/homeassistant/components/mitemp_bt/sensor.py", line 157, in update

data = self.poller.parameter_value(self.entity_description.key)

File "/usr/local/lib/python3.9/site-packages/mitemp_bt/mitemp_bt_poller.py", line 126, in parameter_value

self.fill_cache()

File "/usr/local/lib/python3.9/site-packages/mitemp_bt/mitemp_bt_poller.py", line 59, in fill_cache

self.firmware_version()

File "/usr/local/lib/python3.9/site-packages/mitemp_bt/mitemp_bt_poller.py", line 106, in firmware_version

self.battery = int(ord(res_battery))

TypeError: ord() expected a character, but string of length 15 found

I have tried taking out the battery and putting back in, double checked the MAC Adress, but nothing works.

Any help would be greatly appreciated.

This is well known as the LYWSD03MMC, I would advise to flash it with a custom firmware from ATC or PVVX:

Once done, you will be able to retrieve data from an ESP32 with the help of OpenMQTTGateway, ESPHome or Tasmota
Or on a Raspberry pi with BLE Monitor or Theengs Gateway
Or on a PC with Theengs Gateway

Note that I’m involved into OpenMQTTGateway and Theengs Gateway. They leverage the same decoder.