Skip to content

Instantly share code, notes, and snippets.

View cbenard's full-sized avatar

Chris Benard cbenard

View GitHub Profile
@cbenard
cbenard / motion_activated_light_mode_aware.yaml
Last active June 23, 2025 02:27
Motion-Activated Light with Light Sensor and Mode Support
blueprint:
name: Motion-Activated Light with Optional Modes and Light Sensor
description: >
Turns on lights with optional mode-based day/night logic.
Defensive template usage avoids undefined input errors.
Wait times are in minutes. Modes are CSV strings. Supports multiple lights and optional max-on-time.
domain: automation
author: Chris Benard (assisted by ChatGPT)
input:
motion_sensor:
@cbenard
cbenard / bathroom_humidity_fan.yaml
Last active June 22, 2025 16:57
Bathroom Fan - Auto Control by Humidity
blueprint:
name: Bathroom Fan - Auto Control by Humidity
description: >
Automatically turns on a bathroom fan when humidity spikes quickly, and turns it off
after humidity stabilizes for a set time. Manual overrides are respected. Optionally
turns off the fan after it's been on for a maximum time if the humidity is also flat.
domain: automation
author: Chris Benard (assisted by ChatGPT)
input:
@cbenard
cbenard / backup_zigbee2mqtt.env
Created December 13, 2022 20:43
Zigbee2MQTT Automated Backup
# Requirements:
# Requires jq, base64, and unzip to be installed
MQTT_HOST=mosquitto
MQTT_USER=USERNAME_HERE
MQTT_PASSWORD=PASSWORD_HERE
MQTT_NETWORK=homeassistant_mqtt
MQTT_JSON=mqtt_output_zigbee2mqtt.json
MQTT_ZIP=zigbee2mqtt_backup.zip