Why My ESF-551 Scale Kept Disconnecting from Home Assistant: Japan's Measurement Act A developer traced a Home Assistant BLE integration failure with an Etekcity ESF-551 body scale to Japan's Measurement Act, which bars selling scales that display non-statutory units like pounds and stones, prompting manufacturers to strip the unit-switch feature from Japanese firmware. Using Claude Code, the developer found the integration's unit-write command caused the scale to disconnect after about 0.4 seconds, and a local patch skipping the write restored all 14 sensors. The upstream library shipped v0.8.8 and the Home Assistant integration 0.8.3 the day after the issue was filed, resolving the problem. I connected an Etekcity ESF-551, a BLE body scale, to Home Assistant, and not a single measurement arrived. I had Claude Code chase the cause, and it ended at Article 9 of Japan's Measurement Act. Units sold in Japan have the unit switch removed because of that law. I know nothing about firmware or law. What I did was step on the scale and decide what to have it look into next. Without AI, I couldn't have done this investigation. I used the HACS integration etekcity fitness scale ble , which wraps etekcity esf551 ble==0.8.4 . Claude Code read the log: it showed the integration connecting, reading the HW/SW versions, writing the unit command a5220305002b0163a10000 unit 0, kg , and getting disconnected about 0.4 seconds later. Then it reconnected and did it again. No notification ever came when I stepped on the scale, and every sensor stayed unavailable . It happened even when the command changed nothing, kg to kg. I left the narrowing down to it too. Claude Code subscribed to 0000fff1 from another machine with plain bleak and left out only the unit write. No disconnect. While I stood on the scale, 22-byte notifications arrived about every 45 ms, around 80 of them. So Claude Code wrote a local patch that passes display unit=None and skips the write. All 14 sensors filled in. I had it write the upstream issue too, and filed it etekcity esf551 ble 15 https://github.com/ronnnnnnnnnnnnn/etekcity esf551 ble/issues/15 . Up to here it was a story about fixing a library bug. I had it look for why only the Japanese version lacks a unit switch. The VeSync app has no unit setting, while the US manual has the steps. Putting the back label next to the US spec showed this was a different market variant, not just a firmware revision. Japanese devices and IoT, again, I thought. | | US ESF-551 | The unit I bought in Japan | |---|---|---| | Capacity | 400 lb / 180 kg | 2–150 kg | | Resolution | 0.05 lb / 0.02 kg | 100 g | | Radio approval | FCC ID 2AB22-ESF551 | Giteki R 210-252428 | | Measurement Act | none | household "正" mark | Claude Code also pulled the Measurement Act from the e-Gov law API and read it. Article 9 forbids selling, or displaying for sale, a measuring instrument marked in non-statutory units. A scale that can show lb or st can't be sold in Japan, so manufacturers drop the unit-switch feature from the Japanese firmware. Weighing myself is neither a transaction nor a certification, so Article 8 doesn't touch the user. Only the seller is bound. The Ministry of Economy, Trade and Industry's FY2015 test-purchase report even has a real case: a vendor who didn't know pounds and stones were prohibited was told to seal the device so it couldn't be switched. What I know is why the Japanese version has no unit switch. I can't tell whether the disconnect itself is intended, or just firmware that doesn't know the command and drops the link sloppily. Removing the feature is fine. I just suspect it was removed carelessly. I only have one unit, so I can't say that model identifier 12 in the manufacturer data marks the Japanese variant. For upstream I suggested registering identifier 12 with display unit settable=False so the write is skipped, and left the call to the maintainer. An experiment that sends an unknown opcode to see how it disconnects is still undone. The day after I filed the issue, the maintainer replied. That's interesting to know about that Japanese regulation. That would explain it I guess, and since the option doesn't even show up in the app that pretty much confirms it I think. Library v0.8.8 and the HA integration 0.8.3 came out the same day. I updated the integration to 0.8.3, removed my local patch, stepped on the scale, and the measurements came through. That was surprisingly fast, and I'm grateful. Self-hosting Home Assistant is a chore. But it brings lessons like this one, from a bathroom scale all the way to a statute, and I'm glad I do it. This post was written with AI assistance and reviewed by the author.