Skip to content

Instantly share code, notes, and snippets.

Avatar

Dale Higgs dale3h

View GitHub Profile
@dale3h
dale3h / automations.yaml
Created Dec 2, 2020
[Home Assistant] Restart Time
View automations.yaml
################################################################
# Automations / Restart Time
# Publish timestamps to MQTT broker on start and shutdown.
################################################################
- id: restart_time_start
alias: Publish Start Time
description: Publish current timestamp to MQTT broker on startup.
mode: single
trigger:
@dale3h
dale3h / custom-quickbar.js
Last active Aug 26, 2021
[Home Assistant] Lovelace Custom QuickBar Commands
View custom-quickbar.js
customElements.whenDefined("ha-quick-bar").then(() => {
const fireEvent = (node, type, detail, options) => {
options = options || {};
detail = detail === null || detail === undefined ? {} : detail;
const event = new Event(type, {
bubbles: options.bubbles === undefined ? true : options.bubbles,
cancelable: Boolean(options.cancelable),
composed: options.composed === undefined ? true : options.composed,
});
event.detail = detail;
@dale3h
dale3h / example.conf
Created Nov 8, 2020
[Shell] SSHFS Mount Utilities
View example.conf
remote_user=pi
remote_host=192.168.1.100
remote_path=/home/pi
remote_port=22
@dale3h
dale3h / ha-sidebar-concealer.user.js
Last active Nov 8, 2020
[Userscript] Home Assistant Sidebar Concealer
View ha-sidebar-concealer.user.js
// ==UserScript==
// @name Home Assistant Sidebar Concealer
// @namespace https://dale3h.com
// @version 0.1.0
// @icon https://raw.githubusercontent.com/home-assistant/assets/master/logo-round.svg
// @match https://example.duckdns.org/a0d7b954_vscode*
// @match https://example.duckdns.org/a0d7b954_adguard*
// ==/UserScript==
let counter = 0;
@dale3h
dale3h / autocopy.sh
Created Aug 27, 2020
[unRAID] Auto-Copy for Unassigned Devices Plugin
View autocopy.sh
#!/usr/bin/env bash
################################################################
# Auto-Copy Script for unRAID Unassigned Devices Plugin
# Original script: https://gitlab.com/snippets/1737763
################################################################
PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
# Available variables:
#
@dale3h
dale3h / scripts.yaml
Created Oct 24, 2019
[Home Assistant] Light Brightness Scripts
View scripts.yaml
################################################################################
## Scripts to Adjust Light Brightness
################################################################################
################################################
## Example Usage
################################################
# - service: script.increase_brightness
# data:
@dale3h
dale3h / flow.json
Created Oct 24, 2019
[Node-RED] Controlling Lights with deCONZ and Philips Hue Dimmer
View flow.json
[{"id":"683f5521.03d7ec","type":"link in","z":"2fe9ea1c.17c506","name":"Master Bedroom Dimmer","links":["29f6fa70.0111d6","ddd0422.a7f81c","d8c78531.f3efb8"],"x":55,"y":400,"wires":[["6f9fb9d2.d630a8"]]},{"id":"98b9b53a.831548","type":"switch","z":"2fe9ea1c.17c506","name":"Philips Hue Dimmer","property":"payload.button_id","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"2","vt":"str"},{"t":"eq","v":"3","vt":"str"},{"t":"eq","v":"4","vt":"str"}],"checkall":"false","repair":false,"outputs":4,"x":460,"y":440,"wires":[["c4451284.bb852"],["d330587c.ec3558"],["94d7b051.17b7e"],["6e72b653.bc8898"]],"outputLabels":["On","Bright","Dim","Off"]},{"id":"c4451284.bb852","type":"switch","z":"2fe9ea1c.17c506","name":"On","property":"payload.button_action","propertyType":"msg","rules":[{"t":"eq","v":"press","vt":"str"},{"t":"eq","v":"hold","vt":"str"},{"t":"eq","v":"release_short","vt":"str"},{"t":"eq","v":"release_long","vt":"str"}],"checkall":"false","repair":false,"outputs":4,"x":710,"y":320,"wi
@dale3h
dale3h / Ender 3 + OctoPrint.fff
Created Sep 18, 2019
[Simplify3D] Ender 3 + OctoPrint Profile
View Ender 3 + OctoPrint.fff
<?xml version="1.0"?>
<profile name="Ender 3 + OctoPrint" version="2019-09-18 11:52:09" app="S3D-Software 4.1.2">
<baseProfile>Creality Ender 3 (modified)</baseProfile>
<printMaterial>PLA</printMaterial>
<printQuality>Medium</printQuality>
<printExtruders></printExtruders>
<extruder name="Primary Extruder">
<toolheadNumber>0</toolheadNumber>
<diameter>0.4</diameter>
<autoWidth>0</autoWidth>
@dale3h
dale3h / card-level.yaml
Created Sep 11, 2019
[Lovelace] Style entity icons based on state
View card-level.yaml
# It should be possible to add these CSS variables to your
# frontend theme instead of in the card configuration.
- type: glance
title: Network Devices
columns: 4
show_icon: true
show_name: true
show_state: false
style:
@dale3h
dale3h / bigtimer-outputs.md
Created Jun 26, 2019
Node-RED BigTimer Outputs Documentation
View bigtimer-outputs.md

BigTimer Outputs Documentation

Sample Node Configuration

Node Property Value Node Property Value
Name Big Timer
Comment empty
On Time Dusk Off Time 23:45
On Time2 13:00 Off Time2 13:15