HA Auto Refresh is a script for Home Assistant that automatically detects and clicks the "Refresh" toast notification.
This is particularly useful for wall-mounted tablets, kiosks, and dedicated kiosk setups. When changing the UI (e.g., YAML configuration), Home Assistant displays a toast requiring a manual refresh. This script handles it automatically.
- Zero-Config (by default): Works out of the box after being added as custom resource.
- Fast: Reacts so quickly that the user doesn't even notice.
- Conditional Loading: Can be configured to only run when a specific URL parameter is present (e.g.,
?kiosk=true).
Download ha-auto-refresh.js file from the Releases page:
ha-auto-refresh.js: Use this if you want the script to run always.ha-auto-refresh-kiosk.js: Use this if you want the script to run only when the query parameter?kioskis present in the URL.
Upload the selected file to your Home Assistant config/www/ folder as ha-auto-refresh.js.
Go to Settings > Dashboards > ... (Top Right) > Resources and add the following:
- URL:
/local/ha-auto-refresh.js - Resource Type: JavaScript Module
Once installed, the script runs automatically. When Home Assistant prompts a "Refresh" toast, the script clicks it instantly, making the interaction invisible.
This project uses TypeScript and Vite.
npm installnpm run buildTo enforce a required URL parameter (e.g., ?kiosk) for the script to load:
# Linux / Mac
VITE_REQUIRED_QUERY_PARAM=kiosk npm run build
# Windows (PowerShell)
$env:VITE_REQUIRED_QUERY_PARAM="kiosk"; npm run build- Internationalization: Currently, the script relies on the English "Refresh" string. The build process needs to be updated to automatically fetch translation files from the Home Assistant frontend repository and bundle all language strings.
Since the Home Assistant frontend changes frequently, please file an issue if you encounter any problems, including your HA version and console logs. Contributions and Pull Requests are highly welcome!
If you have any questions, need assistance, or wish to share your ideas, please use GitHub Discussions.
Professional support by [Czetech] is also available at hello@cze.tech.
The source code is available at GitHub.