Skip to content

Instantly share code, notes, and snippets.

@NateEaton
NateEaton / nagging_alert_notification.yaml
Created January 22, 2023 20:55 — forked from pavax/nagging_alert_notification.yaml
Home Assistant Alert Notification Blueprint
blueprint:
name: Nagging Alerting Notification Automation
description: >
Trigger an alert based on the state of a given sensor.
The Alert is send to a mobile app device and repeats as long as the sensor is in the given state.
An additonal action can be specified. This might be useful to tts the message.
domain: automation
source_url: https://gist.github.com/pavax/08705e383bdd3b58ea7b75a1f01c7e54
input:
sensor_entity:
@NateEaton
NateEaton / List Home Assistant Entities by Domain
Created January 21, 2023 03:11
Use in template interpreter
Entities by Domain
{% for d in states | groupby('domain') %}
{% if loop.first %} Domains: {{loop.length}}
{% endif %} - {{ d[0] }} ({{ states[d[0]] | count }})
- {{ states[d[0]] |map(attribute='entity_id')| list|join('\n - ') }}
{% endfor %}
@NateEaton
NateEaton / low-battery-level-detection-notification-for-all-battery-sensors.yaml
Last active January 21, 2023 02:55 — forked from Schm1tz1/low-battery-level-detection-notification-for-all-battery-sensors.yaml
Home Assistant Blueprint: Low battery level detection & notification for all battery sensors
blueprint:
name: Low battery level detection & notification for all battery sensors
description: Regularly test all sensors with 'battery' device-class for crossing
a certain battery level threshold and if so execute an action.
Forked from version by Schm1tz1 which was forked by original by sbyx.
- changed results list delimiter from comma to newlines
- added persistent notification action (but still support additional actions)
- excludes mobile device battery sensors (adapted from blueprint by Marck)
For any battery sensors that are not detected, use Customize to set
device_class = battery.
@NateEaton
NateEaton / minecraft Jack and the Rainbow.py
Last active August 31, 2020 00:41 — forked from richardbwest/minecraft rainbow.py
Jack and the Rainbow is a variation on Rainbow World by Richard B. West, a Python program used to create a rainbow in Minecraft running on Raspberry Pi.
# Jack and the Rainbow, a Python program used to create rainbows in Minecraft on a Raspberry Pi.
# Created by me and my grandson, Jack, as a programming project on his Raspberry Pi 4B.
# The original version by Richard B. West (of which this is a fork) used colored wool blocks.
# This one uses different block types that have at least some semblance of the different rainbow colors.
# It still uses wool for two colors as there just do not appear to be other block types that are close enough.
# Need code to connect to Minecraft
import mcpi.minecraft as minecraft
# Need code to control blocks