{"id":17773445,"url":"https://github.com/imhotep/hass-unifi-access","last_synced_at":"2026-04-01T22:25:39.509Z","repository":{"id":204035042,"uuid":"710961525","full_name":"imhotep/hass-unifi-access","owner":"imhotep","description":"Unifi Access Integration for Home Assistant","archived":false,"fork":false,"pushed_at":"2026-03-22T01:52:44.000Z","size":200,"stargazers_count":169,"open_issues_count":5,"forks_count":37,"subscribers_count":16,"default_branch":"main","last_synced_at":"2026-03-22T12:10:19.409Z","etag":null,"topics":["access-control","home-assistant","unifi-access"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imhotep.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-10-27T20:34:27.000Z","updated_at":"2026-03-22T00:58:57.000Z","dependencies_parsed_at":"2023-12-13T00:32:24.318Z","dependency_job_id":"0b2833ef-d571-4063-a16d-4c579a60e155","html_url":"https://github.com/imhotep/hass-unifi-access","commit_stats":{"total_commits":69,"total_committers":7,"mean_commits":9.857142857142858,"dds":0.2028985507246377,"last_synced_commit":"113b8ec69bb21c5902210405479e0193c12cd2cc"},"previous_names":["imhotep/hass-unifi-access"],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/imhotep/hass-unifi-access","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imhotep%2Fhass-unifi-access","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imhotep%2Fhass-unifi-access/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imhotep%2Fhass-unifi-access/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imhotep%2Fhass-unifi-access/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imhotep","download_url":"https://codeload.github.com/imhotep/hass-unifi-access/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imhotep%2Fhass-unifi-access/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31292639,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["access-control","home-assistant","unifi-access"],"created_at":"2024-10-26T21:44:18.650Z","updated_at":"2026-04-01T22:25:39.501Z","avatar_url":"https://github.com/imhotep.png","language":"Python","funding_links":["https://www.buymeacoffee.com/aniskadri"],"categories":["Home Automation"],"sub_categories":["Home Assistant"],"readme":"# Unifi Access Custom Integration for Home Assistant\n\n- This is a basic integration of [Unifi Access](https://ui.com/door-access) in [Home Assistant](https://homeassistant.io). \n- If you have Unifi Access set up with UID this will likely *NOT* work although some people have reported success using the free version of UID. \n- _Camera Feeds are currently not offered by the API and therefore **NOT** supported_.\n\n# Supported hardware\n- Unifi Access Hub (UAH) :white_check_mark:\n- Unifi Access Hub (UAH-DOOR) :white_check_mark:\n- Unifi Access Intercom (UA-Intercom) :white_check_mark:\n- Unifi Access G3 Intercom (UA-G3-Intercom) :white_check_mark:\n- Unifi Access Hub Enterprise (UAH-Ent) :white_check_mark:\n- Unifi Gate Hub (UGT) :white_check_mark:\n- Unifi Access Ultra (UA-Ultra) :white_check_mark:\n- Unifi Access Door Mini (UA-Hub-Door-Mini) :white_check_mark:\n\n# Getting Unifi Access API Token\n- Go to http(s)://{unifi_access_console}/access/settings/system\n- Create a new token and pick all permissions (this is *IMPORTANT*). At the very least pick: Space, Device and System Log.\n\n# Installation (HACS)\n- Add this repository as a custom repository in HACS and install the integration.\n- Restart Home Assistant\n- Add new Integration -\u003e Unifi Access\n- Enter your Unifi Access controller IP or Hostname (default is `unifi` or `UDMPRO`). No need to enter port or scheme\n- Enter your API Token that you generated in Unifi Access\n- Select `Verify SSL certificate` only if you have a valid SSL certificate. For example: If your Unifi Access API server is behind a reverse proxy. Selecting this will fail otherwise.\n- Select `Use polling` if your Unifi Access version is \u003c 1.90. Default is to use websockets for instantaneous updates and more features.\n- It should find all of your doors and add the following entities for each one\n    - Door Position Sensor (binary_sensor). If you don't have one connected, it will always be **off** (closed).\n    - Doorbell Pressed (binary_sensor). Requires **Unifi Access Reader Pro G1/G2** otherwise always **off**. Only appears when **Use polling** is not selected!\n    - Door Lock (lock). You can unlock or open a door, but locking is unsupported and only logs a warning.\n    - Event entities (`event`): Door Event and Doorbell Press. These are only created when `Use polling` is not selected.\n\n\n# Installation (manual)\n- Clone this repository\n- Copy the `custom_components/unifi_access` to your `config/custom_components` folder in Home Assistant.\n- Restart Home Assistant\n- Add new Integration -\u003e Unifi Access\n- Enter your Unifi Access controller IP or Hostname (default is `unifi` or `UDMPRO`). No need to enter port\n- Enter your API Token that you generated in Unifi Access\n- Select `Verify SSL certificate` only if you have a valid SSL certificate. For example: If your Unifi Access API server is behind a reverse proxy. Selecting this will fail otherwise.\n- Select `Use polling` if your Unifi Access version is \u003c 1.90. Default is to use websockets for instantaneous updates and more features.\n- It should find all of your doors and add the following entities for each one\n    - Door Position Sensor (binary_sensor). If you don't have one connected, it will always be **off** (closed).\n    - Doorbell Pressed (binary_sensor). Requires **Unifi Access Reader Pro G1/G2** otherwise always **off**. Only appears when **Use polling** is not selected!\n    - Door Lock (lock). You can unlock or open a door, but locking is unsupported and only logs a warning.\n    - Event entities (`event`): Door Event and Doorbell Press. These are only created when `Use polling` is not selected.\n\n# Events\nWhen websocket mode is enabled (`Use polling` is **not** selected), this integration creates two Home Assistant `event` entities for each door:\n\n- `Door Event`\n- `Doorbell Press`\n\n## Doorbell Press\nOne `Doorbell Press` entity is created per door. It updates when the integration receives a doorbell start or stop event.\n\n### Event types\n- `unifi_access_doorbell_start`\n- `unifi_access_doorbell_stop`\n\n### Event metadata\n- `door_name`\n- `door_id`\n- `type`\n\nFor hardware doorbells, the integration may emit `unifi_access_doorbell_stop` automatically after a short delay if no explicit stop event is received.\n\n## Door Event\nOne `Door Event` entity is created per door. It updates whenever the integration receives an access event for that door.\n\n### Event types\n- `unifi_access_entry`\n- `unifi_access_exit`\n- `unifi_access_access` (generic access event when the controller does not provide a clear entry/exit direction)\n\n### Event metadata\n- `door_name`\n- `door_id`\n- `actor` # the user tied to the event, when available\n- `authentication` # authentication source reported by the controller\n- `method` # opened method, when provided by the controller\n- `type`\n- `result` # examples: `ACCESS`, `BLOCKED`, `INCOMPLETE`\n\n#### Warning regarding Door Events\nDoor events are using an undocumented API. Sadly, in September 2025, the Unifi Access API introduced some bugs that we have worked around but these events are still not 100% reliable depending on your hub. I recommend using the [Alarm Manager webhooks](https://github.com/imhotep/hass-unifi-access/issues/185#issuecomment-3895814140) if you need a more reliable way to automate based on door events.\n\n### Evacuation/Lockdown\nThe evacuation (unlock all doors) and lockdown (lock all doors) switches apply to all doors and gates and **will sound the alarm** no matter which configuration you currently have in your terminal settings. The status will not update currently (known issue).\n\n### Thumbnail \nA thumbnail of when the door is last accessed/locked/unlocked.\n\n### Door lock rules (only applies to UAH)\nThe following entities will be created: `input_select`, `input_number` and 2 `sensor` entities (end time and current rule).\nYou are able to select one of the following rules via the `input_select`:\n- **keep_lock**: door is locked indefinitely\n- **keep_unlock**: door is unlocked indefinitely\n- **custom**: door is unlocked for a given interval (use the input_number to define how long. Default is 10 minutes).\n- **reset**: clear all lock rules\n- **lock_early**: locks the door if it's currently on an unlock schedule.\n- **lock_now**: locks the door if it's currently on an unlock schedule OR if it's unlocked temporarily via a locking rule.\n\n# Example automations\n\n## Unlock door\n\n```yaml\nalias: Unlock Front Gate when motion is detected in Entryway\ndescription: \"\"\ntrigger:\n  - platform: state\n    entity_id:\n      - binary_sensor.entryway_motion_detected\ncondition: []\naction:\n  - service: lock.unlock\n    data: {}\n    target:\n      device_id: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nmode: single\n```\n\n## Use event as automation trigger\n\nListen to Unifi Access events and use the event data to send a notification whenever someone accesses a door.\n\n```yaml\nalias: Announce person having opened a Unifi door\ndescription: \"\"\ntriggers:\n  - platform: event\n    event_type: \n      - unifi_access_entry\n      - unifi_access_access\nvariables:\n  actor: \"{{ trigger.event.data.actor or 'Unknown' }}\"\n  door_name: \"{{ trigger.event.data.door_name or 'Unknown' }}\"\nactions:\n  - action: notify.mobile_app_my_phone\n    data:\n      title: Door opened\n      message: \"{{ actor }} has opened {{ door_name }}.\"\nmode: single\n```\n# API Limitations\nThe Unifi Access API does *NOT* support door locking at the moment. You probably already have it set to automatically lock after a small delay anyway.\n\n# Removing the integration\n1. Go to **Settings → Devices \u0026 Services → Unifi Access**\n2. Click on the three-dot menu (⋮) on the integration card\n3. Select **Delete**\n4. Restart Home Assistant\n5. If you installed via HACS you can also uninstall the repository from HACS afterwards\n\n# Wishlist\n- door code via service\n\n# Troubleshooting\n\n## Invalid API Key \n\nYou have likely created a Unifi Protect token and you need to create a Unifi Access token\n\nPlease create an issue if you have a feature request and pull requests are always welcome!\n\n# Support my work\n[![\"Buy Me A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/aniskadri)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimhotep%2Fhass-unifi-access","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimhotep%2Fhass-unifi-access","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimhotep%2Fhass-unifi-access/lists"}