Create login link for Home Assistant that you can share with guests.
Lovelace Virtual Keys is a Home Assistant plugin that allows you to create login links that can be shared with guests. These links provide access to specific entities in Home Assistant for a limited time.
Both Virtual Keys integration and the Lovelace plugin need to be installed.
You need to install HACS first.
-
Install the Virtual Keys integration.
-
Add "Custom repositories" to HACS, paste the URL of this repository and select "Dashboard"/"Plugin" as category.
-
Go to HACS -> Integrations, Explore and Download Repositories, search for "lovelace virtual keys" and install it.
-
Add the following to
configuration.yaml
:
panel_custom:
- name: virtual-keys-panel
require_admin: true
url_path: virtual-keys
sidebar_title: Virtual Keys
sidebar_icon: mdi:key-variant
module_url: /local/community/lovelace-virtual-keys/virtual-keys.js
- Restart Home Assistant.
I want to share a "virtual key" with my friends that is valid for a limited time and that they can use to access specific entities in Home Assistant like the front gate. The key is actually a link to my Home Assistant that can be opened in a browser.
To make this work, I need to make some additional steps (after installing Virtual Keys):
-
Create a new user in Home Assistant, e.g., "guest".
-
Create a new group, e.g., "guests", and add the user "guest" to it, and also the devices you want to give access to, e.g., "cover.front_gate". Instructions here.
-
Create 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".
-
Install kiosk-mode and configure it to set "kiosk" mode for user "guest".
That's it, you can now create Virtual Keys and share the link.