mathoudebine / homeassistant-browser-control-card

Control your browser from a Home Assistant lovelace card: full screen, disable screen lock, zoom, reload page...

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Browser Control card

hacs_badge hacs_badge hacs_badge hacs_badge

Based on KTibow/fullscreen-card for card design and full screen
Wake lock part from https://web.dev/wake-lock/

Browser Control card

Control your browser from a Home Assistant lovelace card: full screen, disable screen lock, zoom...
This card is intended for:

  • mobile devices
  • devices with "locked" browser (browser in kiosk mode, without user menu/commands...)

Available browser controls

Icon Control Config. option Availability
Full-screen Enter / exit full-screen hide_fullscreen: true/false check_browser_support
Wake lock Enable / disable screen lock (Wake Lock) hide_screenlock: true/false check_browser_support
Zoom In Zoom out Zoom in / zoom out (using CSS) hide_zoom: true/false check_browser_support
Reload Reload page hide_refresh: true/false check_browser_support

Note: some features may be disabled if your browser does not support them

What is my browser?

If you cannot identify the browser your device is using, browse the following website https://www.whatsmyua.info/
Search the result for a string like Chrome/92.0

Card configuration

The card supports configuration through Home Assistant UI:

Configuration UI

YAML configuration is also supported:

type: custom:browser-control-card
hide_fullscreen: false
hide_screenlock: false
hide_zoom: false
hide_refresh: false
no_padding: false
small_buttons: false

Install the card

Using HACS (recommended)

  1. Make sure HACS is installed.
  2. Go to HACS > Frontend > Explore & download repositories
  3. Search and install "Browser Control Card" that appeared in your Frontend tab
  4. Add the card to your dashboard

Manual install

  1. Copy browser-control-card.js from this repository to your HomeAssistant configuration folder config/www/
  2. Go to HomeAssistant configuration page > Dashboards > Resources tab
  3. Add resource /local/browser-control-card.js (Resource type: JavaScript module)
  4. Reload the web UI by flushing cache (Ctrl + F5)
  5. Add the card to your dashboard

About

Control your browser from a Home Assistant lovelace card: full screen, disable screen lock, zoom, reload page...

License:MIT License


Languages

Language:JavaScript 100.0%