Skip to content

Instantly share code, notes, and snippets.

View xbmcnut's full-sized avatar

xbmcnut

View GitHub Profile
@xbmcnut
xbmcnut / petdash.yaml
Created August 25, 2023 04:13
Sureflap cat flap integration complete with dashboard code
- theme: Backend-selected
icon: mdi:paw
path: sureflap
badges: []
cards:
- type: grid
cards:
- type: picture-glance
entities: []
title: []
@xbmcnut
xbmcnut / tablet_dashboard.yaml
Created December 15, 2020 09:29
Full config for my Home Assistant photo frame dashboard
views:
- badges: []
cards:
- cards:
- cards:
- entity: sensor.time
style: |
ha-card {
color: yellow;
#--paper-item-icon-color: green;
@xbmcnut
xbmcnut / fire_alarm.yaml
Created August 31, 2020 05:26
WIP. Code that speaks which smoke sensor went off and which door to exit. Needs modifying to account for new loop feature added in 0.113.x
automation:
- alias: Announce Fire Alarms
trigger:
platform: state
entity_id:
# Upstairs
- binary_sensor.smoke_sensor_landing
- binary_sensor.smoke_sensor_lounge
# Downstairs south
- binary_sensor.smoke_sensor_davids_bedroom
@xbmcnut
xbmcnut / sunset_notifier.yaml
Created August 31, 2020 05:17
Turn PTZ to sunset, take a snapshot and if the TV is on, send it to the TV
automation:
- alias: 'Take sunset snapshot and send to TV'
initial_state: true
trigger:
platform: numeric_state
entity_id: sun.sun
value_template: "{{ state_attr('sun.sun', 'elevation') }}"
below: 0.3
condition:
- condition: template
@xbmcnut
xbmcnut / hot_water_cylinder.yaml
Last active August 31, 2020 05:10
Control my Hot Water element during peak power times.
# ###################################
# ## Automations
# ###################################
automation:
- alias: Turn off Hot Water Cylinder Mid-Week
id: 1d494c80-41eb-42eb-8e22-60a3606c29d9
trigger:
- platform: time
at: '00:01:00'
- platform: time
@xbmcnut
xbmcnut / pool_management.yaml
Last active August 31, 2020 05:03
Complete pool pump management package
###################################
## Customize
###################################
homeassistant:
customize:
switch.pool_pump:
hidden: false
icon: mdi:radiobox-marked
automation.check_pool_pump_in_season:
hidden: true
@xbmcnut
xbmcnut / ghm_tts.yaml
Created June 22, 2020 10:58
How to get TTS announcements without interrupting Google speakers that are already being used.
# ghm_tts:
alias: 'Google Home Notifier'
sequence:
- service: media_player.volume_set
data_template:
entity_id: >-
{%- set players = ['media_player.kitchen_home', 'media_player.lounge_home', 'media_player.bathroom_speaker', 'media_player.ensuite_speaker'] %}
{{ states.media_player | selectattr('state','!=','playing') | selectattr('entity_id', 'in', players) | map(attribute='entity_id') | join(', ') }}
volume_level: '{{volume}}'
- service: tts.google_say
@xbmcnut
xbmcnut / solar.yaml
Created May 3, 2020 02:39
Solar panel pump with differential in/out temperature sensing for pump control
input_number:
### Solar Pump Hysteresis Offsets ##
pump_off_offset:
name: Pump OFF offset
initial: 0.1
min: 0
max: 2
step: 0.1
pump_on_offset:
@xbmcnut
xbmcnut / tablets.yaml
Created April 25, 2020 09:52
GUI File for my Samsung Tablet interface used as the main screen for my house.
##
@xbmcnut
xbmcnut / arilux.yaml
Last active August 31, 2020 05:21
Arilux RGB Smart Bulb with Tasmota
Light is now picked up using setoption 19 1 (discovery)