Skip to content

Instantly share code, notes, and snippets.

@billchurch
billchurch / pico_fan_5_simple.yml
Last active June 14, 2025 14:10
Control a Home Assistant fan entity (like Big Ass Fans / Haiku) with a Lutron 5-button Fan Pico (PJ2-3BRL-GXX-F01).
blueprint:
name: Pico Fan – Simple 5-Button
description: >
Map a Lutron Fan Pico (PJ2-3BRL-GXX-F01) to one ceiling fan
and an optional light.
Single presses only – no long-press or double-click logic.
domain: automation
author: billchurch
source_url: https://community.home-assistant.io/t/pico-fan-simple-5-button-remote-for-lutron-caseta-haiku-or-any-fan/901507
input:
@billchurch
billchurch / gist:029f75bfbdf5725a6a16e2906f9a572c
Last active May 27, 2025 16:28
Switch from zsh to bash in macOS Sequoia

Switching from zsh to bash on macOS Sequoia (or newer)

This is what I did in macOS to switch the shell shell from zsh to bash, restoring Homebrew paths, and enabling Colima command-line completion.

1. Change the Default Shell to Bash

First, check your current shell:

@billchurch
billchurch / fan.yaml
Created July 26, 2024 19:58
tuya fan with esphome and home assistant
substitutions:
device_name: living-fan
device_description: Living Room Ceiling Fan
friendly_name: Living Room Fan
esphome:
name: ${device_name}
comment: ${device_description}
platform: ESP8266
board: esp01_1m
@billchurch
billchurch / timed_light.yaml
Last active June 2, 2024 12:08
An example of an ESPHome based light (martin jerry MJ-S01) with an on-device timer
substitutions:
device_name: garage-light
friendly_name: Garage Light
default_delay: '900' # default delay of 15 minutes (900 seconds)
pre_off_warning: '30' # pre-off warning period in seconds
location: Garage
ha_timer_number: input_number.garage_light_timer
switch_name: Garage Interior Light Switch
motion_sensor_name: binary_sensor.motion_garage_motion_2
@billchurch
billchurch / sonos_unifi_discovery.py
Last active May 17, 2024 19:16
Python script to find all sonos units on your network with uPNP and then connect to a unifi switch to tell you what switch port they're on
import socket
import requests
import paramiko
import time
import xml.etree.ElementTree as ET
def discover_sonos_devices():
MCAST_GRP = '239.255.255.250'
MCAST_PORT = 1900
msg = (
@billchurch
billchurch / rtl_433_proxmox_docker_lxc.md
Last active February 1, 2025 02:53
rtl_433 proxmox lxc and docker
@billchurch
billchurch / rect-starlink-cable-hack.md
Created August 16, 2022 12:01 — forked from darconeous/rect-starlink-cable-hack.md
Hacking the Rectangular Starlink Dishy Cable
@billchurch
billchurch / newbigip.sh
Last active August 9, 2023 14:14
A simple script that builds a template on Proxmox VE v7.x from a qcow2 image and provides some customization
newbigip.sh
#!/bin/bash
# This script will:
# - Create a 2 core 4096MB BIG-IP virtual machine
# - Install the image specified
# - Customize the image by loading bootstrap files to /config and
# expects:
# startup*
# .startup-env
# Carro Home Daisy Smart Fan with replaced ESP-12 wifi chip #1006938428 #318843266
# Store link: https://tinyurl.com/yp44ux4w
# Story here: http://1projectaweek.com/blog/2022/2/8/converting-a-carro-home-dc-fan-to-esp-home
substitutions:
device_name: penfan
device_description: Penelope's Ceiling Fan
friendly_name: Penelope Fan
esphome:
@billchurch
billchurch / web-servers.md
Created October 30, 2019 14:25 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000