Generate secure login links for Home Assistant to share with your guests.
It's based on the code of @kcsoft, I forked it and I work on it to have one repository and a start date. Other changes are coming
To install Guest Mode using HACS:
- Add this repository as a custom repository in HACS:
- Go to HACS → Integrations → Add Custom Repository.
- Enter the URL of this repository and select Integration as the category.
- Search for "Guest Mode" in HACS and install it.
- Restart Home Assistant.
- Go to Settings → Devices & Services → Add Integration.
- Search for "Guest Mode" and select it.
Option Name | Description | required | default Value |
---|---|---|---|
Tab Icon | Icon for the Guest Mode tab, chosen from 23 MDI icons | No | mdi:shield-key |
Tab Name | Name of the Guest Mode tab. | No | Guest |
Path for Admin UI | Custom URL path for accessing the admin interface | No | /guest-mode |
You can set the link to be active immediately (default mode) or enable a date selector to specify a start date. Additionally, the Home Assistant token is generated only if the guest accesses the link within the defined time frame.
If you want to know whether your guest has used the link, you can check the icon next to the token's name:
- Red: The link has not been used.
- Green: The link has been used, and the Home Assistant token has been created.
I want to share an access with my friends that is valid for a limited time and that they can use to access specific entities in Home Assistant like the fron gate. The access is actually a link to my Home Assistant that can be opened in a browser.
To make this work, I need to make some optional and additional steps (before or after installing Ha Guest Mode):
-
Create a new user in Home Assistant e.g. "guest" (recommended)
-
Set permission, create group e.g. "guests" and add this user this group, and also the devices you want to give access to, e.g. "cover.front_gate". See User Permissions
-
Customize the interface by creating a new View (tab) in the default Lovelace UI and add the entities you want to give access to, e.g. "cover.front_gate", set the visibility to only show to user "guest". (optional)
-
Use Kiosk Mode or Browser Mod to hide unnecessary UI elements for guests, like sidebar. (optional)
You can now generate a secure link to share with your guests.
-
Adding multilingual support 🚀
-
Removeving seconds in UI 🚀
-
Using ha-date-range-picker if is possible 🚀
-
Replace absolute paths with dynamically generated relative paths. 🛠️
-
Improving error handling and code maintainability. 🛠️