Skip to content

Instantly share code, notes, and snippets.

@Didgeridrew
Didgeridrew / esphome_onboard_led.yaml
Last active January 5, 2021 03:11
ESPHome Onboard LED for Rudy
light:
- platform: binary
name: "ESP8266 Onboard LED"
output: onboard_led
output:
- platform: gpio
pin: D4
id: onboard_led
@Didgeridrew
Didgeridrew / esphome_light_entity_options.yaml
Created January 19, 2021 18:25
Light entity options for Rudy
output:
- platform: blueled
id: output_component1
pin: D4
#Choose one of the options below:
#Option 1: Most basic On/Off light entity functions just like a switch in
# Home Assistant except the entity will be light.blueled instead of switch.blueled
light:
alias: Sunset On Sunrise OFF
description: ''
trigger:
- platform: sun
event: sunrise
offset: '-00:30:00'
- platform: sun
event: sunset
offset: '-00:30:00'
condition: []
@Didgeridrew
Didgeridrew / amp_announce_fail.json
Created January 21, 2021 15:49
Alexa Media Player Announce fail
[{"id":"8e92c506.9cb788","type":"api-call-service","z":"39b51019.f8067","name":"TTS in Basement","server":"","version":1,"debugenabled":false,"service_domain":"notify","service":"alexa_media_basement_dot","entityId":"","data":"{\"message\":\"{{payload}}\",\"data\":{\"type\":\"tts\"},\"target\":\"{{service}}\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1810,"y":300,"wires":[[]]},{"id":"96203b86.3412e8","type":"function","z":"39b51019.f8067","name":"Testing TTS Variations","func":"var line1 = [\n 'This is a Test',\n 'I am trying to test something',\n 'This is only a test',\n 'Testing. Testing. 1. 2. 3.',\n 'Is this thing working?',\n 'Hello World',\n 'The quick brown fox jumps over the lazy dog',\n 'This device is conducting a test of the Alexa Broadcast System'\n ]\n \nmsg.payload = \n\nline1[Math.floor(Math.random() * line1.length)]\n\nreturn msg\n","outputs":1,"noerr":0,"in
@Didgeridrew
Didgeridrew / chris_google_cal_events
Last active January 23, 2021 15:59
Google Calendar Events for Chris
#SETUP
- cal_id: <my calendar id>
entities:
- device_id: shared_calendar
ignore_availability: true
name: Shared Calendar
track: true
- device_id: test_lights
name: Lights
track: true
@Didgeridrew
Didgeridrew / serle_repeat_notification
Created January 24, 2021 16:56
Repeating notification for Serle
alias: Notify - Cupboard Door Open
description: ''
trigger:
- type: opened
platform: device
device_id: 3f8555797cd544d4c65da3c55549f765
entity_id: binary_sensor.cupboard_door_contact
domain: binary_sensor
for:
hours: 0
@Didgeridrew
Didgeridrew / serle_t_door_open.yaml
Created January 24, 2021 19:26
serle_t_door_open
alias: Notify - Toilet Door Open Test
description: ''
trigger:
- platform: state
entity_id: binary_sensor.toilet_door_contact
from: 'off'
to: 'on'
for: >-
{{ states('input_number.toilet_door_warning_repeat') | multiply(60) | int }}
condition:
@Didgeridrew
Didgeridrew / set_alexa_alarm_via_ha.yaml
Last active September 26, 2021 10:58
Set Alexa alarm from Home Assistant frontend with selectable echo device
###PREREQUISITES-------------------------
# This function relies on the Alexa Media Player add-on available for install through HACS
#
# You will need to create the following helpers:
# - input_select.alexa_alarm_selector
# This selector needs to have a name for every echo device you want to use.
# - input_datetime.alexa_alarm_set
#
# The "alexa_alarm_template" sensor leverages quirks of the English language in order to emulate
# a voice command. As such, it will likely not work if your Alexa devices are set to another language.
@Didgeridrew
Didgeridrew / alexa_morning_alarm_gcal.yaml
Last active February 2, 2021 21:09
Trigger automation based on Google Calendar Event with offset
#For this automation to work the event title in your
# Google calendar has to contain your search term and your offset i.e. #Work !!-60
# You can modify the offset to whatever value you want
# and it can be in HH:MM or MM format. If you want the automation to trigger
# before your event time, it has to be negative
#google_calendars.yaml
- cal_id: "*****@group.calendar.google.com"
@Didgeridrew
Didgeridrew / kodi_temp_sensor_for_bill.yaml
Last active February 4, 2021 21:48
kodi_temp_sensor_for_bill
sensor:
- platform: template
sensors:
kodi_temp:
friendly_name: GPU temp
device_class: temperature
unit_of_measurement: "°C"
value_template: >-
{{ state_attr('sensor.rpi4_kodi_monitor', 'temp_gpu_c') }}