Skip to content

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

License

Notifications You must be signed in to change notification settings

mathoudebine/homeassistant-browser-control-card

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Browser Control card

hacs_badge hacs_badge hacs_badge hacs_badge

Control your web browser from a Home Assistant dashboard card: full screen, disable screen lock, zoom...

Browser Control card

This card is compatible with all web browsers and is particularly useful for:

  • mobile devices
  • devices with "locked" browser (browser in kiosk mode, without user menu/commands...) like the Facebook/Meta Portal

HomeAssistant controls also available: show/hide navigation bar & sidebar
Changes are not persisted: reload the page to revert to initial settings

Available controls

Note

Some controls may be hidden if your browser does not support them

Icon Control Config. option Availability
Full-screen Enter / exit full-screen controls: [fullscreen] check_browser_support
Wake lock Enable / disable screen wake lock (keep screen always on) controls: [wakelock] check_browser_support
Zoom In Zoom out Zoom in / zoom out (using CSS) controls: [zoom] check_browser_support
Reload Reload page controls: [reload] check_browser_support
Hide navigation bar Hide navigation bar controls: [navbar] check_browser_support
Hide sidebar Hide sidebar controls: [sidebar] check_browser_support

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

Styling options

  • Layout: buttons horizontal alignment and spacing. Select between center (default), space-around, left and right
Centered layout Centered layout
center layout space-around layout
  • No Padding: remove space between buttons and card border
  • Small buttons (button size is based on theme font size)

Card configuration

The card can be configured directly from Home Assistant UI:

Configuration UI

YAML configuration is also supported:

type: custom:browser-control-card
controls:
  - fullscreen
  - wakelock
  - zoom
  - reload
  - navbar
  - sidebar
no_padding: false
small_buttons: false
layout: center

Note

Old configuration keys beginning with hide_ are still supported but will be ignored as soon as the card is configured using UI.

Install the card

Using HACS (recommended)

  1. Make sure HACS is installed.
  2. On HACS interface, search and install "Browser Control Card"
  3. Add the card to your dashboard and configure it

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 > Three-dots "Resources" option in upper-right corner
  3. Add resource /local/browser-control-card.js (Resource type: JavaScript module)
  4. Reload the HomeAssistant UI by flushing cache (Ctrl + F5)
  5. Add the card to your dashboard and configure it

Sources

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%