A Home Assistant custom integration that monitors dashboard ownership to ensure guest users haven't accidentally received access to new dashboards by default.
- Automatic Dashboard Monitoring: Continuously checks all dashboards for guest access
- Flexible Guest Detection: Define guests as either non-admin users or specific user list
- Configurable Actions:
- Notify only mode - sends persistent notifications when violations are detected
- Auto-revoke mode - automatically removes guest access and notifies (requires manual configuration currently)
- Real-time Sensors: Provides sensors to track:
- Number of monitored dashboards
- Number of guest users
- Access violations detected
- Customizable Check Interval: Set how frequently to scan dashboards (10-3600 seconds)
- Open HACS in your Home Assistant instance
- Click on "Integrations"
- Click the three dots in the top right corner
- Select "Custom repositories"
- Add this repository URL:
https://github.com/scottswaaley/hass-guest-page - Select category: "Integration"
- Click "Add"
- Find "Guest Dashboard Guard" in HACS and click "Download"
- Restart Home Assistant
- Copy the
custom_components/guest_dashboard_guardfolder to your Home Assistant'scustom_componentsdirectory - If the
custom_componentsdirectory doesn't exist, create it in the same location as yourconfiguration.yaml - Restart Home Assistant
- Go to Settings → Devices & Services
- Click + Add Integration
- Search for "Guest Dashboard Guard"
- Configure the following options:
- Notify Only: Sends persistent notifications when new dashboards are detected with guest access
- Auto-revoke and Notify: Automatically removes guest access from new dashboards and sends notification (Note: Auto-revoke functionality requires additional configuration)
- Non-admin Users: Considers all users without admin privileges as guests
- Specific Users: Manually select which users should be considered guests
If you selected "Specific Users" detection, select the users from the dropdown list
How often to check for dashboard access violations (10-3600 seconds, default: 60)
You can update the configuration at any time:
- Go to Settings → Devices & Services
- Find "Guest Dashboard Guard"
- Click Configure
- Update your settings
The integration provides three sensors:
-
Monitored Dashboards (
sensor.guest_dashboard_guard_monitored_dashboards)- Shows the total number of dashboards being monitored
-
Guest Users (
sensor.guest_dashboard_guard_guest_users)- Shows the number of users classified as guests
-
Access Violations (
sensor.guest_dashboard_guard_violations)- Shows the number of dashboards with guest access violations
- Attributes include detailed information about each violation
When a violation is detected, you'll receive a persistent notification with:
- Dashboard name and ID
- Description of the issue
- Number of guest users affected
- Action taken (if auto-revoke is enabled)
You can create automations based on the sensors:
automation:
- alias: "Alert on Dashboard Access Violation"
trigger:
- platform: state
entity_id: sensor.guest_dashboard_guard_violations
condition:
- condition: template
value_template: "{{ states('sensor.guest_dashboard_guard_violations') | int > 0 }}"
action:
- service: notify.mobile_app
data:
title: "Dashboard Security Alert"
message: >
{{ states('sensor.guest_dashboard_guard_violations') }} dashboard(s)
have guest access violations!- The integration polls Home Assistant at the configured interval
- It retrieves all dashboards and checks their visibility settings
- For each new dashboard detected:
- Checks if the dashboard is visible to all users (default behavior)
- Checks if any guest users have explicit access
- If a violation is found:
- Creates a persistent notification
- Updates the violation sensor
- Optionally revokes guest access (if configured)
- Auto-revoke functionality: Currently logs the intent but requires manual dashboard permission configuration. This is because Home Assistant's dashboard permission API varies by version.
- Dashboard visibility detection: The integration assumes new dashboards are visible to all users by default (Home Assistant's standard behavior)
- Storage mode dashboards: Works best with storage mode dashboards. YAML mode dashboards have limited visibility control.
Check the logs for errors. The integration tries multiple methods to fetch dashboard information. If you're using YAML mode dashboards, they may not be detected.
If you're getting notifications for dashboards that shouldn't trigger alerts:
- Verify your guest user configuration
- Check if the dashboard has proper visibility restrictions set
- Review the violation sensor attributes for detailed information
- Check Home Assistant logs for errors
- Verify all files are in the correct location
- Ensure you've restarted Home Assistant after installation
- Check that your Home Assistant version is compatible (2023.1+)
- HACS will automatically notify you when updates are available
- Go to HACS → Integrations
- Find "Guest Dashboard Guard"
- Click Update
- Restart Home Assistant
- Download the latest release from GitHub Releases
- Replace the
custom_components/guest_dashboard_guardfolder - Restart Home Assistant
Contributions are welcome! Please feel free to submit a Pull Request.
For maintainers, see RELEASING.md for the release process.
This project is licensed under the MIT License.
If you encounter issues:
- Check the Issues page
- Enable debug logging by adding to your
configuration.yaml:logger: logs: custom_components.guest_dashboard_guard: debug
- Create a new issue with relevant logs and details
Created to help Home Assistant users maintain better control over dashboard access for guest users.