Hi Julian,
Happy to — here’s the full Option 1 route, step by step. The idea: your ESP32 stops being a Madoka client and becomes a standard Bluetooth proxy; Home Assistant does the talking, and the integration handles pairing, reconnection and recovery for you.
Step 1 — un-jam the thermostat first (don’t skip this)
The failed attempts left a stale bond in the BRC1H. On the unit: Bluetooth menu → forget / un-pair, then toggle its Bluetooth off and on again. Otherwise even a perfect config gets refused.
Step 2 — replace your ESPHome config
Delete the external_components:, climate: (platform madoka) and on_disconnect: blocks — the ESP must no longer connect to the thermostat itself, otherwise it occupies its connection slot. Keep your existing esphome: / wifi: / api: / ota: header.
One thing to check before you paste this: which framework your ESP32 is currently on. Look at the top of your existing YAML for an esp32: block — if it says framework: type: arduino (or if there is no framework: line at all on an older ESPHome, which defaulted to arduino), change it to esp-idf as shown below. A proxy that carries active connections needs esp-idf; on arduino you’d get scanning only, and the Madoka would never connect. If your config already has type: esp-idf, you’re set — just leave that block as it is and add the rest.
Two practical notes on that switch:
- The first upload after changing framework rebuilds everything from scratch — it’s slow (several minutes), that’s normal.
- If the OTA upload fails right after the switch, plug the ESP32 into USB and flash it once over serial; OTA works again afterwards.
esp32:
framework:
type: esp-idf
esp32_ble_tracker:
scan_parameters:
interval: 1100ms
window: 1100ms
active: true
bluetooth_proxy:
active: true
# Enables the MITM-capable pairing the BRC1H requires.
# The stock proxy firmware runs io_capability: none — that is exactly why
# the plain bluetooth-proxy build can never pair with a Madoka.
esp32_ble:
io_capability: display_yes_no
# Pairing responder: it never connects on its own (auto_connect: false).
# It only wakes up when HA starts a pairing through this proxy, shows you
# the 6-digit code as an HA notification, and confirms it on the ESP side.
ble_client:
- mac_address: "AA:BB:CC:DD:EE:FF" # your BRC1H
id: madoka_pairing
auto_connect: false
on_numeric_comparison_request:
then:
- homeassistant.action:
action: persistent_notification.create
data:
notification_id: madoka_pairing
title: "Madoka pairing"
message: !lambda 'return "Code on the thermostat screen: " + str_sprintf("%06u", passkey);'
- ble_client.numeric_comparison_reply:
id: madoka_pairing
accept: true
Flash it. For the notification to work, go to Settings → Devices & Services → ESPHome → your proxy → enable “Allow the device to perform Home Assistant actions”. Without it pairing still works, you just won’t see the code in HA.
And if you’d rather not hand-write any of this: tell me the exact board you bought (M5Stack ATOM Lite, ESP32-DevKitC, Wemos D1 Mini32, …) and I’ll give you the config based on the official ESPHome bluetooth-proxy package for that board instead — same result, one line to maintain, with the pairing bits added on top.
Step 3 — install the integration
HACS → three-dot menu → Custom repositories → https://github.com/dasimon135/daikin_madoka, category Integration → install Daikin Madoka → restart HA.
Step 4 — add the thermostat
It should appear on its own as a discovered device (via your proxy). Otherwise: Settings → Devices & Services → Add Integration → Daikin Madoka. On the first connection the BRC1H shows a pairing prompt on its screen — accept it within a few seconds; the ESP side is already auto-confirmed by the responder above.
If something goes wrong, the device page has a sensor.*_connection_status that tells the failure modes apart: not_advertising (out of range / off), needs_pairing (a proxy was refused — press the Reconnect button next to the thermostat and accept the prompt), pairing_slow (busy proxy, it recovers on its own).
Two things worth knowing:
- The bond lives on the proxy, not in HA. One proxy = one pairing. If you later add a second active proxy in range, it needs the same YAML and its own prompt — an unpaired active proxy will happily win the connection and then fail with “Insufficient authentication”.
- You get the single setpoint you wanted outside AUTO mode, plus indoor/outdoor temperature, operating time, filter, and the diagnostics above.
Full reference config (multi-thermostat, multi-proxy, troubleshooting table) is here if you need it later: daikin_madoka/docs/esphome-proxy.md at 8a5ec4d096be9dc13f0be0e7dcf9971e85bae09d · dasimon135/daikin_madoka · GitHub
Shout if the prompt doesn’t show up — that’s the one step that needs you physically at the thermostat.