Home

Awesome

Archived

This project has been archived, but a maintained fork can be found here:

https://github.com/zanna-37/hass-swipe-navigation

Big thanks to @zanna-37!

Lovelace Swipe Navigation

hacs_badge hacs_badge

Swipe through Lovelace views on mobile.

Features:

Installation:

Follow only one of these installation methods.

<details> <summary><b>Installation and tracking with HACS:</b></summary>
  1. In "Frontend" hit the plus at the bottom right, search for "swipe navigation" and install.

  2. Refresh the Lovelace page, may need to clear cache.

</details> <details> <summary><b>Manual installation:</b></summary>
  1. Copy swipe-navigation.js from the latest release into /www/lovelace-swipe-navigation/

  2. Add the resource in ui-lovelace.yaml or in Lovelace Resources.

resources:
  # increase this version number at end of URL after each update
  - url: /local/lovelace-swipe-navigation/swipe-navigation.js?v=1.0.0
    type: module
  1. Refresh the page, may need to clear cache.
</details>

Config:

Mark Watt does an excellent job covering configuation in this youtube video.

Config Options:<br>

NameTypeDefaultDescription
swipe_amountnumber15Minimum percent of screen needed to be swiped in order to navigate.
skip_tabsstringA comma seperated list of views to skip when swiping. e.g., 1,3,5.
skip_hiddenbooleantrueAutomatically skips hidden tabs.
wrapbooleantrueWrap from first tab to last tab and vice versa.
prevent_defaultbooleanfalsePrevents the browsers default horizontal swipe actions. May require a browser refresh to take effect, if using an HA companion app this can be done by closing the app and reopening.
animatestringSwipe animations. Can be: swipe, fade, flip. The swipe animation should be considered experimental and depending on your setup may appear buggy.

Example:<br> Don't just copy the example, it won't fit your needs. Build your own using the config options above.

swipe_nav:
  wrap: false
  animate: swipe
  skip_tabs: 5,6,7,8
  prevent_default: true
  swipe_amount: 30
  
views:

Thank you

Big thanks to: