Skip to content

Instantly share code, notes, and snippets.

View ciotlosm's full-sized avatar

Marius ciotlosm

View GitHub Profile
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) {
// 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 February 5, 2024 15:04
Kiosk mode for lovelace

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.

@ciotlosm
ciotlosm / Lovelace.md
Last active June 24, 2021 20:16
Lovelace
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 June 1, 2018 08:54
Home Assistant - ZHA - Permit join setup
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