Blink integration broken after HA restart — cannot complete 2FA PIN entry (EU/UK, SMS 2FA)

@si458 I am getting a syntax error on line 3. How did you get past that
image

@hometink its a bad copy and paste from the person
The should only be 1 url in there and not 2!
So remove the double url and use a single url instead git clone https://my.url.here /folder/here

Thank you @si458 for pointing out the fault in line 3 of the code in step 2. I’m not able to edit the post itself for some reason so I repost the commands here.

cd /config/custom_components
rm -rf blink
git clone https://github.com/home-assistant/core.git /tmp/hacore
cp -r /tmp/hacore/homeassistant/components/blink .
rm -rf /tmp/hacore
NEW_UUID=$(cat /proc/sys/kernel/random/uuid)
sed -i "s/HARDWARE_ID = \"Home Assistant\"/HARDWARE_ID = \"$NEW_UUID\"/" blink/const.py
sed -i 's/"iot_class": "cloud_polling"/"iot_class": "cloud_polling",\n  "version": "1.0.0"/' blink/manifest.json

Just wanted to say thank you, @hakon!
I have HAOS (OS 18.1, core 2026.7.4) runing in a virtual machine, and with your instructions I got Blink working again!

Thanks alvarea! It worked beautifully. Using HA Green and been struggling with Blink.

Nice thank you, I also was able to fix it with the commands :+1:

:warning: Only one issue with the commands in my case (maybe useful for others):


The Issue: Missing custom_components Directory

If you have never installed HACS or a manual custom integration before, Home Assistant does not have a /config/custom_components directory by default.

When you paste the command block into the terminal, the very first command (cd /config/custom_components) fails with No such file or directory.

Because terminal scripts continue running line-by-line after a soft error, the rest of the script executes in your user home directory (~) instead. As a result:

  • The Blink integration files get copied to ~/blink instead of /config/custom_components/blink.
  • Home Assistant never detects the patched component, and the 406 fix won’t take effect.

The Solution:
Add mkdir -p /config/custom_components at the very beginning of the snippet so the target folder is created automatically if needed before navigating into it.

His workaround worked for me too, but only partially — entities came back after a reload/reboot, then went Unavailable a few hours later, every time.

Why the first workaround isn’t enough

blinkpy 0.25.6 has two different auth paths:

  1. At startup (auth.startup()): the clean OAuth v2 path calls oauth_refresh_token(..., self.hardware_id) → uses the hardware_id from the config entry. Patching it to a UUID fixes this path → integration works after every reload.
  2. At runtime, when the access token expires: a 401 triggers refresh_tokens()login() → the legacy api.request_login(), which builds its header like this:
    "hardware_id": login_data.get("device_id", "Blinkpy"),
    
    It reads device_id, not hardware_id. In my config entry that value was "Blinkpy" (injected by blinkpy’s validate_login_data() default and persisted back by HA’s entry-update callback). "Blinkpy" is not a UUID → Blink rejects it → the endpoint returns an HTML page instead of JSONTokenRefreshFailed → all entities go Unavailable until the next reload.

The complete fix

Set both hardware_id and device_id to the same UUID in the Blink config entry.

# 1. Generate a UUID
python3 -c "import uuid; print(str(uuid.uuid4()).upper())"

# 2. Stop Core and back up (direct SSH session, NOT the web terminal)
ha core stop
cp /config/.storage/core.config_entries /config/.storage/core.config_entries.bak

# 3. Inspect the current Blink entry (note the version and both fields)
jq '.data.entries[] | select(.domain=="blink") | {version, data}' /config/.storage/core.config_entries

# 4. Edit the blink entry: set BOTH fields to the SAME UUID
nano /config/.storage/core.config_entries
#   In the blink entry's "data" block:
#   "hardware_id": "YOUR-UUID-HERE"
#   "device_id":   "YOUR-UUID-HERE"     <- was "Blinkpy"
#   (touch nothing else, keep the JSON valid; other integrations also have device_id keys — leave them alone)

# 5. Restart
ha core start

Optional — only needed if you have to go through a new login / re-auth (config flow), since HARDWARE_ID = "Home Assistant" is still hardcoded in const.py. Note this patch is wiped by every Core update:

docker exec -it homeassistant sed -i 's/"Home Assistant"/"YOUR-UUID-HERE"/' /usr/src/homeassistant/homeassistant/components/blink/const.py

Results

  • Existing refresh token accepted immediately with the new UUID — no re-auth, no 2FA needed.
  • Entities now survive access-token expiry (the point where they previously dropped to Unavailable).
  • The .storage edit survives Core updates (unlike the const.py patch). If your entry is version 4, you’re also safe from the 2026.7.x device_idhardware_id migration (with both fields set to the same UUID it’s a no-op anyway).

Notes

  • 2026.7.4 does not fix this — const.py still hardcodes "Home Assistant".
  • blinkpy 0.25.8/0.25.9 were published on PyPI on July 21; once a Core release bumps blinkpy accordingly, this manual workaround should become unnecessary. Check the changelog before updating.
  • Usual disclaimers: back up before editing .storage, never edit it while Core is running.

Following UK

About to dump blink for reo-link if they keep breaking it

I am not desperate enough to restore Blink using workarounds. Is there any word on an official fix for the integration?

It should arrive for everyone around August 5.

This fixed my integration issue, until official fix is released.
Thank you very much :slight_smile:

Thanks your fix worked perfectly.

Thank you so much! ChatGPT couldn’t help me out, but your fix did! :slight_smile:

this unofficial integration was unsatable from the beginning.
Although it fixed the issue with account log in, however the next day ( I assume with HA restart or refresh) the integration was unstable and entities were unavailable , requiring reloading the integration multiple times a day to force it to work.
after 3 days it completely stopped working and now I receive the same "Authentication faild " error…
Raspberry Pi 4 64bit

  • Core2026.7.4
  • Supervisor2026.07.5
  • Operating System18.2

We are all waiting for the official release to fix it permanently.
Thank you @alvarea for all the effort nevetheless :slight_smile:

Is it normal that it still doesn’t work in 2026.8.0b6?

edit: it seems to work great in stable release.

still broken for me. I get “Invalid authentication” if i try to reauthenticate. 2026.8.0
edit: nvm I did a reload instead of reconfigure and it worked without needing to reauthenticate..

Me too and it’s getting very frustrating… I don’t like hacks … it should be working it’s not like no one knows that there’s an issue…

Oh interesting, I am a bit hesitant to install the new August release because of these entity changes and as my blink currently works with the workaround from here, I also do not have the urgency.

But I thought the new release fixes everything in terms of blink problems. But not so much feedback here since the new release.

Maybe it works for most of the people or they also have not updated yet :sweat_smile::see_no_evil_monkey:

After upgrading to HA Core 8.2 Blink sent me a text with a 2fa verification code on reboot. When I select “Reconfigure” in the device settings, I was sent another 2FA code that I used. The Blink integration is now working as it did before.

Thank you that fixed mine as well!!!