← all posts
Mon 30 Nov 2026 · 7 min read

Bosch Air Con: Home Assistant 2026.11 Broke My Quirk

Back in October I got Home Assistant talking to my Bosch air con, with a custom ZHA quirk to bodge around the ZG-IR01’s habit of asking for everything as sequence number 0. I said at the time that I should report it upstream1.

On a cold November evening coming back from London I wanted to pre-warm the living room a bit, and got home to a cold room. Upstream had fixed the silent failures, and in the process broken my quirk.

What Broke

At some point in the past few weeks I updated my Home Assistant, and as I haven’t needed to use the feature I didn’t notice that something had broken. Every change to the living room AC failed after exactly 60 seconds. Last time the failure was completely silent. This time it was loud, and each send logged three things.

First, my custom quirk crashed as soon as the blaster asked for the message:

File "/config/custom_zha_quirks/hobeian_zg_ir01.py", line 42, in handle_cluster_request
    pending = self.endpoint.device.ir_msg_to_send
AttributeError: 'HobeianZGIR01' object has no attribute 'ir_msg_to_send'

Sixty seconds later, the upstream quirk gave up:

WARNING [zhaquirks.tuya.ts1201] IR code was not confirmed by a4:c1:38:07:63:28:ae:72 (seq: 1)

And finally the climate.set_temperature (or set_hvac_mode) call from bosch_ir failed with a TimeoutError. The log has the same pattern for seq 1 to 4 on 29 November.

Why It Broke

My quirk subclasses the upstream TS1201 one, and the workaround poked at its internals. Those internals have been rewritten. Home Assistant 2026.11.1 ships zha 2.4.3 and zha-quirks 2.4.1, and the rewrite there matches PR #5516, “Fix dropped and unconfirmed TS1201 IR sends”.

Old upstream (October post)zha-quirks 2.4.1
Where the outgoing message livesdevice.ir_msg_to_send, a dict keyed by seqZosungIRTransmit.pending_send, one PendingIRSend(seq, msg, confirmed, closed)
Unknown seq in a chunk request (frame 0x02)Silently droppedLogs “no pending message for seq” and drops it
Device’s “got it” (frame 0x04)Not waited forResolves confirmed, and the seq must match
IRSend returnsImmediately, success either wayOnly once confirmed, and raises on timeout
TimeoutNone10 s for mains, 60 s for sleepy (battery) blasters2
ConcurrencyNoneA lock per blaster, one transfer at a time

The first row is what broke my quirk: ir_msg_to_send doesn’t exist any more, so line 42 fell over. Fixing that also showed up the change in the third row. Upstream now waits for the blaster to confirm, so if this firmware confirms with seq 0 as well, the send would still time out with the crash out of the way.

So I turned on debug logging for zigpy.zcl and zhaquirks.tuya.ts1201 and traced one send3. Upstream’s debug line for chunk requests doesn’t include the seq, so the raw frames were the thing to read:

FrameFrom the blasterSeq
0x01“Got your announcement”2, the real one
0x02 (all 8 of them)“Send me the next chunk”0
0x04“I’ve got it all”0

It does confirm with seq 0, so without re-keying the confirmation as well, every send would still time out after 60 seconds. It also turns out that “never echoes back the sequence number” from last time was a bit strong: it gets it right exactly once, in the acknowledgement, and then forgets it for the rest of the transfer4.

To be fair to upstream, this is a good change. Failed sends now show up as errors, rather than the silent nothing I spent ages debugging in October. It made this one easy to find.

The Fix

The idea is the same as before: when the firmware asks for the wrong seq, give it the message we actually queued. Only the class body of HobeianIRTransmit changes. The device signature and replacement stay as they were.

The October version:

python
1def handle_cluster_request(self, hdr, args, *, dst_addressing=None):
2    pending = self.endpoint.device.ir_msg_to_send
3    if hdr.command_id == self.ServerCommandDefs.receive_ir_frame_02.id and (
4        args.seq == 0 or args.seq not in pending
5    ):
6        latest = next((s for s in reversed(pending) if s != args.seq), None)
7        if latest is not None:
8            pending[args.seq] = pending[latest]
9    return super().handle_cluster_request(hdr, args, dst_addressing=dst_addressing)

The new one:

python
 1def handle_cluster_request(self, hdr, args, *, dst_addressing=None):
 2    pending = self.pending_send
 3    if (
 4        pending is not None
 5        and hdr.command_id
 6        in (
 7            self.ServerCommandDefs.receive_ir_frame_02.id,
 8            self.ServerCommandDefs.receive_ir_frame_04.id,
 9        )
10        and args.seq != pending.seq
11    ):
12        # Same message and futures, just under the device's seq.
13        self.pending_send = pending._replace(seq=args.seq)
14    return super().handle_cluster_request(hdr, args, dst_addressing=dst_addressing)

It’s simpler than the original, and leans on upstream rather than keeping its own dict of messages:

  • Re-key, don’t copy. PendingIRSend is a NamedTuple, so _replace makes a copy with the device’s seq but the same message and the same confirmed and closed futures. When upstream resolves them, the send that’s waiting still sees it.
  • Chunk requests and confirmations are both covered. A seq mismatch on frame 0x02 (“send me a chunk”) or 0x04 (“I’ve got it all”) gets re-keyed before upstream checks it, and upstream then serves and confirms the send as normal.
  • Only while a send is in flight. With no pending_send, the request goes straight through. Learning uses frames 0x00, 0x03 and 0x05, so it isn’t touched.
  • Cleanup still works. Upstream clears pending_send when the transfer ends, and its timeout warning uses the original seq it kept for itself.

After a full restart (custom quirks only load at startup, same as last time), I set the living room AC to 17 °C in heat. The AC beeped, and the call came back in a few seconds rather than timing out after 60.

Bosch IR v1.2.0

The fixed quirk is now in the repo as part of ha_bosch_ir v1.2.0, and the README now says it needs Home Assistant 2026.11 or later (zha-quirks 2.4.1+). It also has a troubleshooting note for the AttributeError and the “not confirmed” warning. If you’re on an older Home Assistant, stick with the October version of the quirk.

While I was in there, the integration also picked up support for the Tuya TS1201 family (TS1201, ZS06, Moes UFO-R11). Those blasters want Tuya’s compressed codes rather than the ZG-IR01’s Broadlink-style ones, so the encoder can now produce either. The integration picks the format from the blaster’s model in the device registry. It checks this each time it sends, not once at setup. At startup the blaster isn’t always in the registry yet, and the first version of this fell back to Broadlink codes until the next restart5. TS1201-family blasters already have a quirk built into ZHA, so they don’t need the custom one at all.

I haven’t been able to test the TS1201 changes, though: the blaster I have seems to have died, and I think the USB charger it was plugged into isn’t happy.

The First Post

A fair bit of the October post is now wrong for anyone on 2026.11 or later, so it has a note at the top listing what’s changed, section by section.

Final Thoughts

This is the risk with a custom quirk that subclasses upstream code: it rides on someone else’s private internals, and an ordinary update can pull them out from under you.

The upside is that the same update fixed the problem that made the original bug so hard to spot. It turns out there’s been a draft PR for the ZG-IR01 (#5376) upstream since September. It sends everything as seq 0 on purpose, which is the right idea, but it’s still built on the old ir_msg_to_send internals, so it’ll need reworking for 2026.11 before it can land. If it does, the custom quirk can go, which is the best kind of fix.


  1. I did not… ↩︎

  2. The ZG-IR01 runs on two AAAs, so it gets the full 60 s. ↩︎

  3. Re-sending the current setting (17 °C, heat), so the AC didn’t actually change. The blaster was also perfectly happy with our replies going back as seq 0. ↩︎

  4. Which, in fairness, is about my hit rate with names at conferences. ↩︎

  5. Which broke TS1201 blasters, so the fix went into v1.2.0 before the release went out. ↩︎

search.exe
esc to close