Skip to content

Instantly share code, notes, and snippets.

@ishults
Last active November 26, 2019 14:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ishults/9828f04ea9dbaf084912f1ae31a3286d to your computer and use it in GitHub Desktop.
Save ishults/9828f04ea9dbaf084912f1ae31a3286d to your computer and use it in GitHub Desktop.
# Compiled by Igor Shults
# As of version 0.17.x
####################################################
# #
# Basic Settings #
# #
####################################################
### Global configuration ###
homeassistant:
name: Home
temperature_unit: F
time_zone: America/Chicago
latitude: <redacted>
longitude: <redacted>
customize:
# Washer
switch.aeotec_smart_energy_switch_switch_3:
friendly_name: Washer Switch
hidden: true
sensor.aeotec_smart_energy_switch_power_3:
friendly_name: Washer (W)
hidden: false
sensor.aeotec_smart_energy_switch_energy_3:
friendly_name: Washer (kWh)
hidden: true
sensor.aeotec_smart_energy_switch_previous_reading_3:
friendly_name: Washer Previous(kWh)
hidden: true
input_select.washer_status:
hidden: true
# Dryer
switch.aeotec_smart_energy_switch_switch_2:
friendly_name: Dryer Switch
hidden: true
sensor.aeotec_smart_energy_switch_power_2:
friendly_name: Dryer (W)
hidden: false
sensor.aeotec_smart_energy_switch_energy_2:
friendly_name: Dryer (kWh)
hidden: true
sensor.aeotec_smart_energy_switch_previous_reading_2:
friendly_name: Dryer Previous(kWh)
hidden: true
input_select.dryer_status:
hidden: true
# yr weather
sensor.yr_symbol:
friendly_name: Weather
sensor.yr_temperature:
friendly_name: Temperature
### Toggles ###
#introduction: # Show links to resources in log and frontend
#sun: # Track the sun
updater: # Checks for available updates
frontend: # Enables the frontend
history: # Enables support for tracking state changes over time.
logbook: # View all events in a logbook
discovery: # Discover some devices automatically
conversation: # Allows you to issue voice commands from the frontend
####################################################
# #
# Devices #
# #
####################################################
### Track who is home ###
device_tracker:
platform: asuswrt
host: 192.xxx.x.x
username: <redacted>
password: <redacted>
track_new_devices: no
interval_seconds: 30
consider_home: 300
### Send messages ###
notify:
platform: googlevoice
username: <redacted>
password: <redacted>
name: gvoice
### Weather ###
sensor:
- platform: yr
monitored_conditions:
- temperature
- symbol
- platform: template
sensors:
washer_display:
value_template: "{{ states('input_select.washer_status') }}"
friendly_name: 'Washer'
- platform: template
sensors:
dryer_display:
value_template: "{{ states('input_select.dryer_status') }}"
friendly_name: 'Dryer'
### IP Webcam ###
camera:
platform: mjpeg
mjpeg_url: http://192.xxx.x.x:xxxx/video
name: Nexus Camera
username: <redacted>
password: <redacted>
## Z-Wave Washer Energy Switch ##
# Washer Switch
zwave:
usb_path: /dev/ttyACM0
config_path: /path/to/python-openzwave/openzwave/config
polling_interval: 30000
customize:
# Washer
# Polling for Z-Wave doesn't seem to work unless we set these
sensor.aeotec_smart_energy_switch_power_3:
polling_intensity: 1
sensor.aeotec_smart_energy_switch_switch_3:
polling_intensity: 1
sensor.aeotec_smart_energy_switch_previous_reading_3:
polling_intensity: 1
switch.aeotec_smart_energy_switch_switch_3:
polling_intensity: 1
# Dryer
sensor.aeotec_smart_energy_switch_power_2:
polling_intensity: 1
sensor.aeotec_smart_energy_switch_switch_2:
polling_intensity: 1
sensor.aeotec_smart_energy_switch_previous_reading_2:
polling_intensity: 1
switch.aeotec_smart_energy_switch_switch_2:
polling_intensity: 1
####################################################
# #
# Groups #
# #
####################################################
group:
media:
name: Media
entities:
- media_player.chromecast1
- media_player.chromecast2
laundry:
name: laundry
entities:
# Washer
- sensor.washer_display
- input_select.washer_status
- switch.aeotec_smart_energy_switch_switch_3
- sensor.aeotec_smart_energy_switch_energy_3
- sensor.aeotec_smart_energy_switch_power_3
- sensor.aeotec_smart_energy_switch_previous_reading_3
# Dryer
- sensor.dryer_display
- input_select.dryer_status
- switch.aeotec_smart_energy_switch_switch_2
- sensor.aeotec_smart_energy_switch_energy_2
- sensor.aeotec_smart_energy_switch_power_2
- sensor.aeotec_smart_energy_switch_previous_reading_2
####################################################
# #
# Automation #
# #
####################################################
automation:
### Washer/Dryer ###
### - Washer state machine ###
- alias: 'Washer status - Off'
trigger:
platform: numeric_state
entity_id: sensor.aeotec_smart_energy_switch_power_3
below: 0.5
action:
service: input_select.select_option
data:
entity_id: input_select.washer_status
option: 'Off'
- alias: 'Washer status - On'
trigger:
platform: numeric_state
entity_id: sensor.aeotec_smart_energy_switch_power_3
below: 5
above: 0.5
action:
service: input_select.select_option
data:
entity_id: input_select.washer_status
option: 'On'
- alias: 'Washer status - Running'
trigger:
platform: numeric_state
entity_id: sensor.aeotec_smart_energy_switch_power_3
above: 5
action:
service: input_select.select_option
data:
entity_id: input_select.washer_status
option: 'Running'
### - Washer actions ###
- alias: 'Washer done'
trigger:
platform: state
entity_id: input_select.washer_status
from: 'Running'
action:
service: notify.gvoice
data:
message: 'Washer done!'
target:
- <redacted>
### - Dryer state machine ###
- alias: 'Dryer status - Off'
trigger:
platform: numeric_state
entity_id: sensor.aeotec_smart_energy_switch_power_2
below: 1
action:
service: input_select.select_option
data:
entity_id: input_select.dryer_status
option: 'Off'
- alias: 'Dryer status - On'
trigger:
platform: numeric_state
entity_id: sensor.aeotec_smart_energy_switch_power_2
below: 20
above: 1
action:
service: input_select.select_option
data:
entity_id: input_select.dryer_status
option: 'On'
- alias: 'Dryer status - Running'
trigger:
platform: numeric_state
entity_id: sensor.aeotec_smart_energy_switch_power_2
above: 20
action:
service: input_select.select_option
data:
entity_id: input_select.dryer_status
option: 'Running'
### - Dryer actions ###
- alias: 'Dryer done'
trigger:
platform: state
entity_id: input_select.dryer_status
from: 'Running'
action:
service: notify.gvoice
data:
message: 'Dryer done!'
target:
- <redacted>
####################################################
# #
# Custom Inputs #
# #
####################################################
input_select:
washer_status:
name: Washer Status
options:
- 'Off'
- 'On'
- 'Running'
initial: 'Off'
icon: mdi:water
dryer_status:
name: Dryer Status
options:
- 'Off'
- 'On'
- 'Running'
initial: 'Off'
icon: mdi:weather-windy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment