Skip to content

Instantly share code, notes, and snippets.

blueprint:
name: Calendar Notifications & Actions
description: >
# 📅 Calendar Notifications & Actions
**Version: 1.9**
Transform Your Calendar: Turn Events Into Notifications and Actions! 📅🔔⚙️
@NateEaton
NateEaton / alert_water_leak.yaml
Created January 18, 2025 05:23
Use the Home Assistant Alert feature to warn when a water leak sensor detects moisture.
#
# Warn of a detected water leak
#
# Detect a leak
template:
- binary_sensor:
- name: "Water Leak Detected"
state: >
{{ states.binary_sensor
@NateEaton
NateEaton / state_based_entity_control_ignoring_target_entity_state_changes.yaml
Last active August 29, 2024 03:27
State Based Entity Control Ignoring Target Entity State Changes
blueprint:
name: State Based Entity Control Ignoring Target Entity State Changes
description: >-
Change the target entity to desired entity state base on the trigger entity's state,
illuminance sensor's state, Sun elevation and so on.
Adapted from State Based Entity Control (https://github.com/ql-owo-lp/homeassistant/blob/main/blueprints/state_based_entity_control.yaml)
Mods by NateEaton to ignore state of target entity.
domain: automation
source_url: https://gist.github.com/NateEaton/3d7ee2960b7f3beca25ce25dbb8f264f
input:
@NateEaton
NateEaton / outdoor-night-lighting-control-with-migration-overrides.yaml
Last active September 3, 2024 21:15
Outdoor Night Lighting Control with Migration Overrides
blueprint:
name: Outdoor Night Lighting Control with Migration Overrides
description: >
Control outdoor lights with options for on at sunset and off at sunrise (with optional offsets), or at fixed times, and bird migration overrides.
- By default, lights are turned on at sunset and turned off at sunrise. If an offset is specified (positive or negative), that is applied to either the sunset or sunrise time.
- As an alternative to using sunset or sunrise, lights can be turned on and/or off at a fixed time.
@NateEaton
NateEaton / rain_gauge.yaml
Created May 26, 2024 04:36
Zigbee Rain Gauge
# Zigbee Tipping Bucket Rain Gauge
# For 3D parts: https://smartsolutions4home.com/ss4h-zrg-zigbee-rain-gauge/
#
# Because the rain gauge is designed for each bucket tip to change the state of
# binary_sensor.rain_gauge_sensor from On to Off or Off to On, the following
# intermediate components are used so that it just takes one history stats
# sensor per time period.
# - input_boolean.rain_gauge_bucket_tipped
# - automation.rain_gauge_bucket_tipped
# These are set up using the UI but copies of yaml for each are included
@NateEaton
NateEaton / sound-level-meter.yaml
Created April 6, 2024 02:44
Data Collection Components for Total Solar Eclipse using ESPHOME and Home Assistant
# yamllint disable rule:brackets rule:commas
esphome:
name: sound-level-meter
friendly_name: sound-level-meter
external_components:
- source: github://stas-sl/esphome-sound-level-meter
esp32:
@NateEaton
NateEaton / magnetometer.yaml
Created April 6, 2024 02:43
Data Collection Components for Total Solar Eclipse using ESPHOME and Home Assistant
esphome:
name: "magnetometer"
friendly_name: "magnetometer"
esp32:
board: seeed_xiao_esp32c3
variant: esp32c3
framework:
type: arduino
@NateEaton
NateEaton / light-measurement.yaml
Last active April 6, 2024 02:42
Data Collection Components for Total Solar Eclipse using ESPHOME and Home Assistant
esphome:
name: light-measurement
friendly_name: light-measurement
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
@NateEaton
NateEaton / environment.yaml
Last active April 6, 2024 02:44
Data Collection Components for Total Solar Eclipse using ESPHOME and Home Assistant
esphome:
name: environment
friendly_name: environment
esp32:
board: esp32dev
framework:
type: arduino
@NateEaton
NateEaton / rainfall_calc.py
Created January 7, 2024 02:31
Calculations for Calibrating Tipping Bucket Rain Gauge with Conical Funnel
import sys
import getopt
import math
# Function to calculate the height of water column per tip in metric units
def calculate_height_metric(volume_ml, radius_mm):
radius_m = radius_mm / 1000 # Convert mm to meters
volume_m3 = volume_ml / 1e6 # Convert ml to cubic meters
height_m = volume_m3 / (math.pi * radius_m**2)
return height_m * 1000 # Convert meters to mm