1.7 KiB
1.7 KiB
Auto-Scroll Dashboard Setup Guide
Method 1: Using Browser Mod (Recommended)
If you have browser_mod installed:
- Add this to your dashboard YAML (already included in
dashboard-kiosk-with-scroll.yaml) - Create an automation in Home Assistant:
automation:
- alias: "Kiosk Auto-Scroll"
trigger:
- platform: state
entity_id: browser_mod.browser_kiosk
to: "on"
action:
- service: browser_mod.execute_script
target:
entity_id: browser_mod.browser_kiosk
data:
command: |
(function() {
const cards = Array.from(document.querySelectorAll('ha-card'));
cards.forEach(card => card.style.minHeight = window.innerHeight + 'px');
let i = 0;
setInterval(() => {
i = (i + 1) % cards.length;
cards[i].scrollIntoView({ behavior: 'smooth', block: 'start' });
}, 5000);
window.scrollTo({ top: 0, behavior: 'smooth' });
})();
Method 2: Manual JavaScript Injection
- Open the dashboard in Firefox
- Press F12 to open Developer Tools
- Go to Console tab
- Paste the code from
dashboard-auto-scroll.js - Press Enter
The script will:
- Make each card full viewport height
- Auto-scroll every 5 seconds
- Loop through all cards
Method 3: Using card-mod with CSS Animation (Limited)
CSS-only scrolling is tricky. The JavaScript method is more reliable.
Files Created:
dashboard-kiosk-with-scroll.yaml- Dashboard with card-mod stylingdashboard-auto-scroll.js- JavaScript for auto-scrollingdashboard-kiosk-cardmod.yaml- Dashboard with card-mod (no auto-scroll JS)