Skip to content

Instantly share code, notes, and snippets.

@clemone210
Last active March 22, 2024 00:28
Show Gist options
  • Save clemone210/9dd9fea5c93bc7cab736a9614a717221 to your computer and use it in GitHub Desktop.
Save clemone210/9dd9fea5c93bc7cab736a9614a717221 to your computer and use it in GitHub Desktop.
Homeassistant Unifi Protect integration fails to initialize with Unifi v3.2.12 version and HA Core 2024.3.1 Supervisor 2024.03.0 Operating System 12.1

How to fix Homeassistant Unifi Protect not starting after update v3.2.12

The issue is described here: home-assistant/core#112298

This is how you can fix it temporarily

  1. Use either SSH to connect to your Homeassistant instance or use the Addon "Advanced SSH & Web Terminal" in unprotected mode.
  2. run docker exec -it homeassistant bash
  3. inside the container run vi /usr/local/lib/python3.12/site-packages/pyunifiprotect/data/types.py
  4. use / to search and then enter "DELETE", hit enter to go to the correct line.
  5. Add below the line DELETE_MEDIA = "deletemedia"
  6. Hit ESC and type:w to save the file.
  7. Hit ESC and type:xto close the editor
  8. Type exit to exit the container
  9. Enter docker restart homeassistantto restart the homeassistant container.
  10. After this, Unfi should work again.

Please note that this is only a temporary fix. I do not know if it will break future updates or if it is persistent after a system reboot. This "guide" is only what I did to resolve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment