Skip to content

Instantly share code, notes, and snippets.

View dale3h's full-sized avatar

Dale Higgs dale3h

View GitHub Profile
@dale3h
dale3h / bigtimer-outputs.md
Created June 26, 2019 22:51
Node-RED BigTimer Outputs Documentation

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
@dale3h
dale3h / automations.yaml
Created May 15, 2019 04:45
[Home Assistant] Webhook Debugger
# Webhook URL: https://[your-hass-domain]/api/webhook/2qDFuSEBA7jU2sNjaK6JD5ac3FxnGfVTSF
- id: webhook_debugger
alias: "Webhook Debugger"
trigger:
- platform: webhook
webhook_id: 2qDFuSEBA7jU2sNjaK6JD5ac3FxnGfVTSF
action:
- service: persistent_notification.create
data_template:
@dale3h
dale3h / blank.png
Last active May 2, 2020 13:06
Lovelace: Fire TV Remote Card
blank.png
@dale3h
dale3h / speck
Last active September 24, 2018 18:39
Hass.io Local Add-on Reloader
#!/bin/bash
readonly BACKUP_DIR=/backup/speck
usage() {
echo "usage: $(basename "$0") addon_name" 2>&1
exit 1
}
addon_install() {
@dale3h
dale3h / configuration.yaml
Created September 1, 2018 00:49
[Home Assistant] If/Then Script
http:
...
trusted_networks:
- 127.0.0.1
rest_command:
ha_rest_api:
url: "http://localhost:8123/api/services/{{ service|replace('.', '/') }}"
method: post
content_type: application/json
@dale3h
dale3h / MessageForwarding_StreamlabsSystem.py
Created August 17, 2018 22:46
Streamlabs Message Forwarding [Twitch <-> Discord] (Author: Castorr91)
#!/usr/bin/python
# -*- coding: utf-8 -*-
# pylint: disable=invalid-name
"""Forward messages from twitch chat to discord chat or the other way around"""
#---------------------------------------
# Libraries and references
#---------------------------------------
import codecs
import json
import os
@dale3h
dale3h / ui-lovelace.yaml
Created July 28, 2018 09:15
[Lovelace] How to Duplicate a Lovelace Card
title: Home
views:
- title: View 1
cards:
- &card1
type: entities
title: Card 1
show_header_toggle: false
entities:
- light.bedroom
@dale3h
dale3h / ui-lovelace.yaml
Created July 23, 2018 22:32
[Lovelace] Create a header by using `panel: true` with nested stack cards
title: Home
views:
- title: Header
icon: mdi:car
panel: true
cards:
- type: vertical-stack
cards:
- type: glance
entities:
@dale3h
dale3h / jail.local
Created June 29, 2018 15:47
[fail2ban] Improved nginx-badbots
# Add to file: /etc/fail2ban/jail.local
[nginx-badbots]
enabled = true
port = http,https
filter = nginx-badbots
logpath = %(nginx_access_log)s
maxretry = 1
findtime = 604800
bantime = 604800
@dale3h
dale3h / lovelace-migrate.py
Created June 29, 2018 00:02
Lovelace UI Migration Script
"""
Migration tool for Home Assistant Lovelace UI.
"""
import argparse
import logging
import sys
import json
from collections import OrderedDict
from getpass import getpass