Skip to content

Instantly share code, notes, and snippets.

Avatar

Marius ciotlosm

View GitHub Profile
View light-slider.js
class LightSlider extends HTMLElement {
constructor() {
super();
this.attachShadow({ mode: 'open' });
this._state = {};
}
set hass(hass) {
this._hass = hass;
const entity = hass.states[this._config.entity];
if (entity && entity.state != this._state.state || entity.attributes.brightness != this._state.brightness) {
View clock-element.js
// based on https://codepen.io/mohebifar/pen/KwdeMz
class ClockElement extends HTMLElement {
constructor() {
super();
this.attachShadow({ mode: 'open' });
}
set hass(hass) {
}
@ciotlosm
ciotlosm / Readme.md
Last active Aug 2, 2021
Kiosk mode for lovelace
View Readme.md

Kiosk mode

Installation

Add kiosk.js file with the content below to your www folder in config.

Like any other custom script, use ui-lovelace.yaml resources section to reference the kiosk.js file.

Make sure you add kiosk somewhere in your URL. You can use it in the id of your view or in the query string.

View zigbee2mqtt.yaml
mqtt:
broker: homeassistant # This will have to be your mqtt broker
discovery: true
input_boolean:
zigbee_permit_join:
name: Allow devices to join
initial: off
icon: mdi:cellphone-wireless
@ciotlosm
ciotlosm / zha.yaml
Last active Jun 1, 2018
Home Assistant - ZHA - Permit join setup
View zha.yaml
zha:
usb_path: /dev/ttyAMA0
database_path: zigbee.db
baudrate: 57600
input_boolean:
zigbee_permit_join:
name: Allow zigbee to join
initial: off
icon: mdi:cellphone-wireless