Skip to content

Instantly share code, notes, and snippets.

Avatar

Kevin Dorff kdorff

View GitHub Profile
View led-and-key-1.yml
##
## Sample ESPHome configuration details to use TM1638 LED&KEY with ESPHome
## using an ESP32 D1 Mini
##
## Wiring of the TM1638
## 3.3v and GND from 3.3V and GND from the microcontroller (may not be ideal?)
## STB on D7, GPIO13
## CLK on D6, GPIO12
## DIO on D5, GPIO14
##
@kdorff
kdorff / moisture-1.yml
Created May 18, 2022
ESPHome code for moisture sensors
View moisture-1.yml
# Reads analog data using an ads1115. Three moisture sensors and a battery sensor.
# Goes to sleep for an hour at a time.
# Uses a helper input_boolean to keep it from going to sleep, in case you want to update it.
esphome:
name: moisture-1
platform: ESP32
board: esp32dev
on_boot:
then:
@kdorff
kdorff / distance-sensor-0.yaml
Last active Sep 22, 2022
Break beam sensor using VL53L0X for Home Assistant using ESPHome
View distance-sensor-0.yaml
##
## A standard "break beam sensor" uses a laser or LED with a device on both
## sides of an opening and is triggered when something breaks the beam
## (such as a customer walking through the beam). Some garage doors use them.
## Stores often use them at the entrace to ring a chime when a customer enters
## or leaves.
##
## This is my attempt at using a VL53L0X i2c Time of Flight sensor
## as a break beam sensor in Home Assistant using ESPHome.
##
@kdorff
kdorff / automations-partial.yml
Created Mar 8, 2022
Home Assistant Automations for WLED on my stairs
View automations-partial.yml
##
## Motion detected upstairs
## -----------------------------
## If (timer.stairs_motion_timer is not active AND
## input_boolean.wled_stairs_auto_enabled is on),
## this will configure and turn on the lights and
## set timer.stairs_motion_timer to 15 seconds.
##
## The lights will be turned off by the
## expiration of timer.stairs_motion_timer in the
@kdorff
kdorff / last_diff.groovy
Last active Oct 31, 2021
Groovy script to perform diff against the last two autorestic snapshots for a list of backends.
View last_diff.groovy
#!/usr/bin/env groovy
import groovy.yaml.YamlSlurper
/**
*
* Script to perform a diff from latest:latest to latest on the
* list of autorestic backends passed in as command line arguments.
*
* REQUIREMENTS