Skip to content

Instantly share code, notes, and snippets.

View andrew-codechimp's full-sized avatar

Andrew Jackson andrew-codechimp

View GitHub Profile
@andersonimes
andersonimes / voicemail.yaml
Last active March 12, 2024 19:30
Blueprint for a Home Assistant voicemail automation for Technithusiast
blueprint:
name: Voicemail Reminder Automation
description: If you have uncompleted items on a to-do list when occupancy is detected, announce it on a speaker.
domain: automation
input:
occupancy_sensor:
name: Occupancy Binary Sensor
description: You can use any sensor as an occupancy sensor as long as it's a binary sensor
selector:
entity:
blueprint:
name: Advanced Appliance Power Monitor
description: |
Monitors the activity of an appliance based on the power it uses (W) after given delays, and triggers actions based on start, running (power usage changed), and stop. You can use the variables
* `{{ elapsed_time }}` (total seconds)
* `{{ elapsed_time_days }}`
* `{{ elapsed_time_hours }}`
* `{{ elapsed_time_minutes }}`
* `{{ elapsed_time_seconds }}`
* `{{ energy_used }}`
blueprint:
name: Add Hildebrand CAD Entities
description: Create devices and entities using MQTT discovery
domain: script
source_url: https://gist.github.com/jamesonuk/079ed3639924e9f373783e5b67f4385d
input:
input_cad_mac:
name: MAC Address
description: "MAC address of CAD (without :s)"
default: ""
//
// ContentView.swift
// AppleLogo
//
// Created by Oskar Groth on 2021-06-17.
//
import SwiftUI
struct ContentView: View {
@jordansinger
jordansinger / AppleLogo.swift
Created June 16, 2021 18:37
Original Apple logo in SwiftUI
import SwiftUI
struct ContentView: View {
var body: some View {
VStack(spacing: 0) {
Color.green
Color.green
Color.green
Color.yellow
Color.orange
@niro1987
niro1987 / zha_ikea_tradfri_2button_remote_brightness.yaml
Last active August 21, 2024 21:07
Home Assistant - Blueprint - ZHA - IKEA TRADFRI - 2 Button Remote - OnOff and Brightness
---
# This automation simulates the use of the IKEA TRADFRI Dimmer control
# connected through ZHA.
# | Button | Action |
# | ----------- | ------------------- |
# | on (short) | Turn the light on |
# | off (short) | Turn the light off |
# | on (long) | Increase brightness |
# | off (long) | Decrease brightness |
@networkingcat
networkingcat / yet_another_motion_automation.yaml
Last active July 31, 2024 08:22 — forked from quallenbezwinger/motion_controlled_scenes_enhanced.yaml
Homeassistant blueprint for motion-activated light scene
blueprint:
name: Yet Another Motion Automation
description: >
# YAMA V10
Turn on lights or scenes when motion is detected.
Four different scenes can be defined depending on time of day.
@sbyx
sbyx / notify-or-do-something-when-an-appliance-like-a-dishwasher-or-washing-machine-finishes.yaml
Last active September 14, 2024 19:56
Home Assistant Blueprint: Notify or do something when an appliance like a dishwasher or washing machine finishes
blueprint:
name: Appliance has finished
description: Do something when an appliance (like a washing machine or dishwasher)
has finished as detected by a power sensor.
domain: automation
input:
power_sensor:
name: Power Sensor
description: Power sensor entity (e.g. from a smart plug device).
selector:
@amannayak0007
amannayak0007 / GradientBg
Last active August 27, 2024 10:40
Animated gradient background
import SwiftUI
struct ContentView: View {
var body: some View {
AnimatedBackground().edgesIgnoringSafeArea(.all)
.blur(radius: 50)
}
}
struct AnimatedBackground: View {
@IanKeen
IanKeen / Usage.swift
Created July 24, 2020 18:47
SwiftUI: Show a sheet based on an optionals unwrapped value
@main
struct MyApp: App {
enum Sheet { case first, second }
@State var sheet: Sheet? = nil
var body: some Scene {
WindowGroup {
VStack {
Button("First") { sheet = .first }