Skip to content

Instantly share code, notes, and snippets.

View xbmcnut's full-sized avatar

xbmcnut

View GitHub Profile
@xbmcnut
xbmcnut / shelly.yaml
Created October 9, 2018 01:19
Package to add two Shelly2's to Home Assistant
###################################
## Customize
###################################
homeassistant:
customize:
switch.family_room_fan:
hidden: False
icon: mdi:fan
light:
@xbmcnut
xbmcnut / power_monitoring.yaml
Created March 23, 2019 02:08
Power monitoring and costing package using mostly Xiaomi smart Xigbee sockets
sensor:
- platform: template
sensors:
total_power_usage:
value_template: '{{ ((states.sensor.xiaomi_tv_power.state | float) +
(states.sensor.xiaomi_office_power.state | float) +
(states.sensor.xiaomi_server_power.state | float) +
(states.sensor.pool_pump_power.state | float) +
(states.sensor.cupboard_light_power.state | float) +
(states.sensor.stairs_shelly_power.state | float) +
@xbmcnut
xbmcnut / harmony_remote.yaml
Last active March 23, 2019 22:31
Package to control my Harmony Hub system. Switches are added to Cloud config for Google and Alexa control
###################################
## Customize
###################################
homeassistant:
customize:
switch.kodi:
hidden: false
icon: mdi:movie-roll
switch.magic_tv:
hidden: false
@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 / 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 / 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 / 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 / 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 / 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)
@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