Skip to content

Instantly share code, notes, and snippets.

View tathamoddie's full-sized avatar

Tatham Oddie tathamoddie

View GitHub Profile
rest:
- scan_interval: 15
resource: https://192.168.180.199/ivp/meters/readings
verify_ssl: false
headers:
Authorization: !secret enphase_api_token
sensor:
- unique_id: enphase_rest_production_meter
name: "Enphase Production Meter"
json_attributes_path: "$.0.channels[0]"
@tathamoddie
tathamoddie / automation-router-watchdog.yaml
Created August 7, 2023 04:25
HA automation for a router/modem watchdog
alias: "[Tech] Router Watchdog"
mode: single
trigger:
- platform: state
entity_id:
- binary_sensor.ping_udm_ipv4
to: "off"
for:
minutes: 15
condition:
@tathamoddie
tathamoddie / Post Notification.yaml
Last active January 12, 2023 23:38 — forked from andrew-codechimp/Post Notification.yaml
Home Assistant Post Notification Example
alias: Post Notification
description: ""
mode: restart
trigger:
- platform: state
entity_id:
- binary_sensor.z2maqarareed01_contact
from: "on"
to: "off"
for:
alias: "[Washing] Done"
description: ""
trigger:
- platform: numeric_state
entity_id: sensor.washing_machine_power
for:
hours: 0
minutes: 0
seconds: 0
above: "500"
substitutions:
device_name: roller-door
friendly_name: Roller Door
## Board config
esphome:
name: ${device_name}
platform: ESP32
board: m5stack-core-esp32
## ui-views/0-home.yaml
title: Home
path: home
icon: mdi:home
badges:
- sun.sun
- sensor.moon
- person.matt
- person.tats
@tathamoddie
tathamoddie / Run-Simulation.ps1
Created July 30, 2022 07:06
Run a solar and battery simulation using real historical data
<#
.SYNOPSIS
Run a solar and battery simulation using real historical data
.DESCRIPTION
Combines real usage data from Powershop's export format, in 30-minute buckets,
with real regional solar performance data from https://pv-map.apvi.org.au/live,
in 15-minute buckets, to simulate the effectiveness of a solar and battery system.
.EXAMPLE
.\Run-Simulation.ps1 `
-PeakGeneration 5.46 `
- alias: 'Washing Done'
mode: restart
trigger:
- platform: numeric_state
entity_id: sensor.washing_machine_power
above: 0
for:
minutes: 5
action:
- wait_for_trigger:
substitutions:
device_name: powerpal-gateway
friendly_name: Powerpal Gateway
esphome:
name: ${device_name}
platform: ESP32
board: m5stack-core-esp32
wifi:
@tathamoddie
tathamoddie / configuration.yaml
Last active January 9, 2022 21:48
Home Assistant Australian RAT Finder
# Per https://www.home-assistant.io/docs/configuration/packages/#create-a-packages-folder
homeassistant:
packages: !include_dir_named packages