All Projects → maykar → Kiosk Mode

maykar / Kiosk Mode

🙈 Hides the Home Assistant header and/or sidebar

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Kiosk Mode

Home Assistant Config
Home Assistant Configuration & Documentation for my Smart House.
Stars: ✭ 1,115 (+1111.96%)
Mutual labels:  home-assistant
Addon Wireguard
WireGuard - Home Assistant Community Add-ons
Stars: ✭ 72 (-21.74%)
Mutual labels:  home-assistant
Hassctl
Simple command line utility to help debug Home Assistant configuration
Stars: ✭ 77 (-16.3%)
Mutual labels:  home-assistant
Home Assistant Macbook Touch Bar
Displaying Home Assistant sensors in the Macbook Pro's touch bar using BTT 🤖💻
Stars: ✭ 64 (-30.43%)
Mutual labels:  home-assistant
Node Red Contrib Home Assistant
Home Assistant + Node-Red
Stars: ✭ 71 (-22.83%)
Mutual labels:  home-assistant
Hass Bha Icons
Additional icons for Home Assistant to accompany the MDI icons
Stars: ✭ 75 (-18.48%)
Mutual labels:  home-assistant
Scenegen
🎆 Generate Scenes for Home Assistant
Stars: ✭ 60 (-34.78%)
Mutual labels:  home-assistant
Homeassistant Config
Configuration for @brianjking & @KinnaT's Home Assistant Installation
Stars: ✭ 80 (-13.04%)
Mutual labels:  home-assistant
Restriction Card
🔒 Apply restrictions to Lovelace cards
Stars: ✭ 72 (-21.74%)
Mutual labels:  home-assistant
Ha Bt Proximity
Distributed Bluetooth Room Presence Sensor for Home Assistant
Stars: ✭ 77 (-16.3%)
Mutual labels:  home-assistant
Homeassistant Config
My personal Home Assistant config
Stars: ✭ 66 (-28.26%)
Mutual labels:  home-assistant
Streamdeck Homeassistant
🏠 Use the Elgato Stream Deck as Home Assistant controller. Call any available service and toggle lights or resume your music.
Stars: ✭ 69 (-25%)
Mutual labels:  home-assistant
Monitor docker
Monitor Docker containers from Home Assistant
Stars: ✭ 76 (-17.39%)
Mutual labels:  home-assistant
Lovelace Time Picker Card
🕰️ Time Picker Card for Home Assistant's Lovelace UI
Stars: ✭ 63 (-31.52%)
Mutual labels:  home-assistant
Ha Average
Average Sensor for Home Assistant
Stars: ✭ 79 (-14.13%)
Mutual labels:  home-assistant
Addon Ide
IDE - Home Assistant Community Add-ons
Stars: ✭ 61 (-33.7%)
Mutual labels:  home-assistant
Home Assistant Configs
Config files used for my install of Home Assistant. This is no longer maintained as I started my install over, and have been using the UI for configuration.
Stars: ✭ 73 (-20.65%)
Mutual labels:  home-assistant
Noctis
🐵 Dark Blue Theme for Home Assistant
Stars: ✭ 83 (-9.78%)
Mutual labels:  home-assistant
Flex Horseshoe Card
Flexible Horseshoe card for Home Assistant Lovelace UI. A card with a flexible layout, a horseshoe-like donut graph, multiple entities or attributes, graphics and animations!
Stars: ✭ 80 (-13.04%)
Mutual labels:  home-assistant
Hassio Addons
The repository for my Home Assistant Supervisor Add-ons.
Stars: ✭ 71 (-22.83%)
Mutual labels:  home-assistant

kiosk-mode

hacs_badge hacs_badge

Hides the header and/or sidebar drawer in Home Assistant

image

Installation

If you previously used custom-header you need to uninstall it from HACS

Follow only one of two installation methods below, HACS or Manually:

Installation and tracking with HACS
  • In the "Frontend" section of HACS hit the plus icon in the bottom right
  • Search for Kiosk Mode and install it
  • If using YAML mode or if HACS doesn't automatically add it you'll need to add the resource below

YAML mode users will add it to their configuration.yaml file. Non-YAML mode, or Storage Mode, users can find resources in their sidebar under "Configuration" > "Lovelace Dashboards" > "Resources"

resources:
  - url: /hacsfiles/kiosk-mode/kiosk-mode.js
    type: module

Manual installation
  • Download kiosk-mode.js from the latest release and place it in your www folder
  • Add the resource below

YAML mode users add it to their configuration.yaml file. Non-YAML mode, or Storage Mode, users can find resources in their sidebar under "Configuration" > "Lovelace Dashboards" > "Resources"

resources:
  # You'll need to update the version number at the end of the url after every update.
  - url: /local/kiosk-mode.js?v=1.2.1
    type: module

If you have trouble installing please read this guide

Important Info

  • If you need to disable Kiosk-Mode temporarily add ?disable_km to the end of your URL.
  • Config is placed in the root of your Lovelace config: kiosk_mode: should not be indented & is per dashboard.
  • If you want the same settings on other dashboards you'll need to repeat the config on those dashboards as well.
  • Refresh page after config changes.

Config Options

Config Option Type Default Description
kiosk: Boolean false Hides both the header and sidebar.
hide_header: Boolean false Hides only the header.
hide_sidebar: Boolean false Hides only the sidebar.
ignore_entity_settings: Boolean false Useful for conditional configs and will cause entity_settings to be ignored.
ignore_mobile_settings: Boolean false Useful for conditional configs and will cause mobile_settings to be ignored.

Simple config example

kiosk_mode:
  hide_header: true
  
views:

Note: views: is added in the example above to show where kiosk_mode: should be placed in your Lovelace config

Conditional Lovelace Config

Contitional configs take priority and if a condition matches all other config options/methods are ignored. These use the same options as above, but placed under one of the following user/entity conditions:

admin_settings:

Sets the config for every admin user.
Overwritten by user_settings, mobile_settings, and entity_settings ( unless one of the ignore options is used ).

kiosk_mode:
  admin_settings:
    hide_header: true

non_admin_settings:

Sets the config for every regular user.
Overwritten by user_settings, mobile_settings, and entity_settings ( unless one of the ignore options is used ).

kiosk_mode:
  non_admin_settings:
    hide_header: true
    ignore_entity_settings: true

user_settings:

Sets the config for specific users. This uses a user's name, not their username (if they're different).
Overwritten by mobile_settings, and entity_settings ( unless one of the ignore options is used ).

kiosk_mode:
  user_settings:
    - users:
        - "ryan meek"
        - "maykar"
      hide_sidebar: true
    - users:
        - "the wife"
      kiosk: true
      ignore_entity_settings: true

mobile_settings:

Sets the config for mobile devices. The default breakpoint is 812px, which can be changed by setting the custom_width option.
Overwritten by entity_settings, unless ignore_entity_settings is used, can be ignored with ignore_mobile_settings.

kiosk_mode:
  mobile_settings:
    hide_header: true
    ignore_entity_settings: true
    custom_width: 768

entity_settings:

Dynamically change config on any entity's state. Under entity: list the entity followed by the state that will enable the config below. For more complex logic use this with a template sensor.
Takes priority over all other config settings unless they use ignore_entity_settings.

Any condition that doesn't match will then fall back to previous configurations if another "false" entity condition hasn't also been set (see the 2nd example).

kiosk_mode:
  entity_settings:
    - entity:
        input_boolean.hide_sidebar: 'on'
      hide_sidebar: true
    - entity:
        sensor.hide_header: 'on'
      hide_header: true
    - entity:
        input_text.kiosk: 'true'
      kiosk: true
kiosk_mode:
  entity_settings:
    # hide_sidebar has both true and false conditions to be a true override.
    - entity:
        input_boolean.hide_sidebar: 'on'
      hide_sidebar: true
    - entity:
        input_boolean.hide_sidebar: 'off'
      hide_sidebar: false

Query Strings

Add a query string such as ?kiosk to the end of your URL:

https://hass:8123/lovelace/default_view?kiosk

The query string options are:

  • ?kiosk to hide both header and sidebar
  • ?hide_header to hide only the header
  • ?hide_sidebar to hide only the sidebar

Query String Caching

You save settings in a devices cache by using the cache keyword once on the device.
This will also make it so the options work on all views and dashboards.

Example: ?hide_header&cache makes all views & dashboards hide the header.
This works for all query strings except for the utility strings listed below.

Utility Query Strings

  • ?clear_km_cache will clear all cached preferences
  • ?disable_km will temporarily disable any modifications

Related


Credit

This was originally based on and inspired by ciotlosm's kiosk mode gist and corrafig's fork of the same gist.

Big thank you to matt8707 for starting this project, allowing me to rewrite it, and transfering ownership.

Many thanks to KTibow as well, for the github release action and support.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].