Massive Migration! #292

This commit is contained in:
root
2018-01-01 19:00:45 -05:00
commit 1baa895f41
241 changed files with 28076 additions and 0 deletions

35
packages/README.md Executable file
View File

@@ -0,0 +1,35 @@
# [![Build Status](https://travis-ci.org/CCOSTAN/Home-AssistantConfig.svg?branch=master)](https://travis-ci.org/CCOSTAN/Home-AssistantConfig) Home-Assistant Config by [@ccostan](http://www.twitter.com/ccostan)
[Home Assistant](https://home-assistant.io/) configuration files (YAMLs)
Be sure to :star: my repo so you can keep up to date on the daily progress!
This section is for the packages. (It's being slowly built out)
**Twitter Account**
-You can see my home in action by following it's Twitter account [@BearStoneHA](https://twitter.com/BearStoneHA)
-Home Assistant live tweets activities in the house on it's own dedicated Social Media Account.
**Alarm System**
You can find out about how I swapped out my ADT for 3 NodeMCUs [here](http://www.vmwareinfo.com/2017/06/building-my-home-alarm-system-hardware.html).
**Landscape Lighting**
For the ladnscape lights, I have 2 12v transformers in the backyard. One powers the front landscape lights and the other the backyard landscaping lights.
I have put 2 [GE ZWave Outdoor Power Module](http://amzn.to/2q17R4S) conneted to the transformers and controlled by my [Wink Hub](http://amzn.to/2orGEWo). They are set to turn on landscape lighting at sunset and turn off at random times before sunrise.
![Screenshot of Landscape Lighting](https://i.imgur.com/CFSWGXW.png)
**Nest Protects**
You can find my [Nest protects](http://amzn.to/2poqKhu) write up [here](http://www.vmwareinfo.com/2017/06/psa-check-out-your-smoke-detectors-once.html).
![Screenshot of Protects](https://i.imgur.com/hUAaIiF.png)
**Neato Vacuum**
I can control my [Neato Vacuum](http://amzn.to/2kqnnqu) with Home Assistant.
![Screenshot of D7 Vacuum](https://i.imgur.com/jLikEk6.png)
#Still have questions on my Config?
Follow me on twitter : [@CCostan](https://twitter.com/ccostan)
You can also vist my [Blog](http://www.vmwareinfo.com/search/label/iot) for all of my [Home Automation Posts](http://www.vmwareinfo.com/search/label/iot).
<a target='_blank' rel='nofollow' href='https://app.codesponsor.io/link/3MkgeKFUVKPNW45Vtwu9Abd4/CCOSTAN/Home-AssistantConfig'>
<img alt='Sponsor' width='888' height='68' src='https://app.codesponsor.io/embed/3MkgeKFUVKPNW45Vtwu9Abd4/CCOSTAN/Home-AssistantConfig.svg' />
</a>

305
packages/alarm.yaml Executable file
View File

@@ -0,0 +1,305 @@
#-------------------------------------------
# ALarm Related Packages
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
#-------------------------------------------
homeassistant:
customize_glob:
"device_tracker.nodemcu*":
icon: mdi:chip
emulated_hue_hidden: True
hidden: True
"sensor.nodemcu*":
icon: mdi:alarm-bell
emulated_hue_hidden: True
hidden: False
"binary_sensor.mcu?_gpio*":
icon: mdi:security-home
emulated_hue_hidden: True
hidden: False
customize:
binary_sensor.MCU1_GPIO4:
friendly_name: 'Paige Window'
binary_sensor.MCU1_GPIO5:
friendly_name: 'Front Door'
binary_sensor.MCU1_GPIO10:
friendly_name: 'Dining Room Windows'
binary_sensor.MCU1_GPIO12:
friendly_name: 'Interior Garage Door'
binary_sensor.MCU1_GPIO13:
friendly_name: 'Front Den Windows'
binary_sensor.MCU1_GPIO14:
friendly_name: 'Office Window'
binary_sensor.MCU2_GPIO4:
friendly_name: 'Dinette Windows'
binary_sensor.MCU2_GPIO5:
friendly_name: 'Back Door'
binary_sensor.MCU2_GPIO9:
friendly_name: 'Master Slider'
binary_sensor.MCU2_GPIO10:
friendly_name: 'Master Bathroom Window'
binary_sensor.MCU2_GPIO12:
friendly_name: 'Main Slider'
binary_sensor.MCU2_GPIO13:
friendly_name: 'Upstairs Bedroom Window'
binary_sensor.MCU2_GPIO14:
friendly_name: 'Justin Window'
binary_sensor.MCU3_GPIO4:
friendly_name: 'Stacey Bedroom Window'
binary_sensor.MCU3_GPIO5:
friendly_name: 'Carlo Bedroom Window'
binary_sensor.MCU3_GPIO10:
friendly_name: 'Master Bedroom Window'
binary_sensor.MCU3_GPIO14:
friendly_name: 'Upstairs Windows'
binary_sensor.MCU3_Light:
friendly_name: 'Panel Door'
group.entry_points:
friendly_name: Alarm Entry Points
homebridge_hidden: true
group.interior_door:
friendly_name: Interior doors
homebridge_hidden: true
#-------------------------------------------
binary_sensor:
- platform: mqtt
state_topic: "NodeMCU1/GPIO4/Status"
name: "MCU1_GPIO4"
payload_on: 1
payload_off: 0
device_class: opening
- platform: mqtt
state_topic: "NodeMCU1/GPIO5/Status"
name: "MCU1_GPIO5"
payload_on: 1
payload_off: 0
device_class: opening
- platform: mqtt
state_topic: "NodeMCU1/GPIO10/Status"
name: "MCU1_GPIO10"
payload_on: 1
payload_off: 0
device_class: opening
- platform: mqtt
state_topic: "NodeMCU1/GPIO12/Status"
name: "MCU1_GPIO12"
payload_on: 1
payload_off: 0
device_class: opening
- platform: mqtt
state_topic: "NodeMCU1/GPIO13/Status"
name: "MCU1_GPIO13"
payload_on: 1
payload_off: 0
device_class: opening
- platform: mqtt
state_topic: "NodeMCU1/GPIO14/Status"
name: "MCU1_GPIO14"
payload_on: 1
payload_off: 0
device_class: opening
- platform: mqtt
state_topic: "NodeMCU2/GPIO4/Status"
name: "MCU2_GPIO4"
payload_on: 1
payload_off: 0
device_class: opening
- platform: mqtt
state_topic: "NodeMCU2/GPIO5/Status"
name: "MCU2_GPIO5"
payload_on: 1
payload_off: 0
device_class: opening
- platform: mqtt
state_topic: "NodeMCU2/GPIO9/Status"
name: "MCU2_GPIO9"
payload_on: 1
payload_off: 0
device_class: opening
- platform: mqtt
state_topic: "NodeMCU2/GPIO10/Status"
name: "MCU2_GPIO10"
payload_on: 1
payload_off: 0
device_class: opening
- platform: mqtt
state_topic: "NodeMCU2/GPIO12/Status"
name: "MCU2_GPIO12"
payload_on: 1
payload_off: 0
device_class: opening
- platform: mqtt
state_topic: "NodeMCU2/GPIO13/Status"
name: "MCU2_GPIO13"
payload_on: 1
payload_off: 0
device_class: opening
- platform: mqtt
state_topic: "NodeMCU2/GPIO14/Status"
name: "MCU2_GPIO14"
payload_on: 1
payload_off: 0
device_class: opening
- platform: mqtt
state_topic: "NodeMCU3/GPIO4/Status"
name: "MCU3_GPIO4"
payload_on: 1
payload_off: 0
device_class: opening
- platform: mqtt
state_topic: "NodeMCU3/GPIO5/Status"
name: "MCU3_GPIO5"
payload_on: 1
payload_off: 0
device_class: opening
- platform: mqtt
state_topic: "NodeMCU3/GPIO10/Status"
name: "MCU3_GPIO10"
payload_on: 1
payload_off: 0
device_class: opening
- platform: mqtt
state_topic: "NodeMCU3/GPIO14/Status"
name: "MCU3_GPIO14"
payload_on: 1
payload_off: 0
device_class: opening
- platform: mqtt
state_topic: "NodeMCU3/Light/Status"
name: "MCU3_Light"
payload_on: 1
payload_off: 0
device_class: opening
# input_boolean:
# elephant:
# name: Elephant
# initial: off
#-------------------------------------------
sensor:
- platform: template
sensors:
nodemcu1:
friendly_name: 'NodeMCU1'
value_template: "{{ 'Online' if is_state('device_tracker.NodeMCU1', 'home') else 'Offline' }}"
- platform: template
sensors:
nodemcu2:
friendly_name: 'NodeMCU2'
value_template: "{{ 'Online' if is_state('device_tracker.NodeMCU2', 'home') else 'Offline' }}"
- platform: template
sensors:
nodemcu3:
friendly_name: 'NodeMCU3'
value_template: "{{ 'Online' if is_state('device_tracker.NodeMCU3', 'home') else 'Offline' }}"
#-------------------------------------------
group:
entry_points:
entities:
- binary_sensor.MCU1_GPIO4
- binary_sensor.MCU1_GPIO5
- binary_sensor.MCU1_GPIO10
- binary_sensor.MCU1_GPIO12
- binary_sensor.MCU1_GPIO13
- binary_sensor.MCU1_GPIO14
- binary_sensor.MCU2_GPIO4
- binary_sensor.MCU2_GPIO5
- binary_sensor.MCU2_GPIO9
- binary_sensor.MCU2_GPIO10
- binary_sensor.MCU2_GPIO12
- binary_sensor.MCU2_GPIO13
- binary_sensor.MCU2_GPIO14
- binary_sensor.MCU2_GPIO15
- binary_sensor.MCU3_GPIO4
- binary_sensor.MCU3_GPIO5
- binary_sensor.MCU3_GPIO10
- binary_sensor.MCU3_GPIO14
# interior_door: - Moved out to Doors Group.
# entities:
# - binary_sensor.kitchen_door_opened
# - binary_sensor.MCU3_Light
#-------------------------------------------#-------------------------------------------
automation:
- alias: 'Turn off HVAC in window/door is opened'
trigger:
- platform: state
entity_id:
- binary_sensor.MCU1_GPIO4
- binary_sensor.MCU1_GPIO5
- binary_sensor.MCU1_GPIO10
- binary_sensor.MCU1_GPIO12
- binary_sensor.MCU1_GPIO13
- binary_sensor.MCU1_GPIO14
- binary_sensor.MCU2_GPIO4
- binary_sensor.MCU2_GPIO5
- binary_sensor.MCU2_GPIO9
- binary_sensor.MCU2_GPIO10
- binary_sensor.MCU2_GPIO12
- binary_sensor.MCU2_GPIO13
- binary_sensor.MCU2_GPIO14
- binary_sensor.MCU3_GPIO4
- binary_sensor.MCU3_GPIO5
- binary_sensor.MCU3_GPIO10
- binary_sensor.MCU3_GPIO14
to: 'on'
from: 'off'
for:
minutes: 5
condition:
- condition: template
value_template: "{{ states('climate.downstairs') != 'off' }}"
action:
- service: climate.set_operation_mode
data:
entity_id: climate.downstairs
operation_mode: 'off'
- service: script.speech_engine
data_template:
value1: "The {{ trigger.to_state.attributes.friendly_name }} has been opened for about 5 minutes. I will shut down the Air Conditioner so you can enjoy the fresh air."
call_outside_weather: 1
call_inside_weather: 1
#-------------------------------------------#-------------------------------------------
- alias: 'Turn HVAC back on when all doors/windows are closed.'
trigger:
- platform: state
entity_id:
- group.entry_points
to: 'off'
from: 'on'
for:
minutes: 5
condition:
- condition: template
value_template: "{{ states('climate.downstairs') == 'off' }}"
action:
- service: climate.set_operation_mode
data:
entity_id: climate.downstairs
operation_mode: 'auto'
#-------------------------------------------#---
- alias: "Panel Door opened"
hide_entity: True
trigger:
- platform: state
entity_id:
- binary_sensor.MCU3_Light
to: 'off'
from: 'on'
action:
- service: script.notify_engine
data_template:
value1: 'Someone has opened up the Alarm Panel Door!'

138
packages/alarm_clock.yaml Executable file
View File

@@ -0,0 +1,138 @@
#-------------------------------------------
# Fire Tablet Alarm Panel -
# http://www.vmwareinfo.com/2017/07/visualizing-smart-home-using-home.html
#-------------------------------------------
#
homeassistant:
customize_glob:
"input_boolean.clock_snooze":
emulated_hue_hidden: False
hidden: False
media_player:
- platform: floorplan_speaker
name: Alarm Clock
#---Sensors for Fire Tablet-----------------------------
binary_sensor:
- platform: mqtt
state_topic: floorplan/clock_motion
name: Clock Motion
device_class: motion
retain: true
emulated_hue_hidden: True
hidden: False
- platform: mqtt
state_topic: floorplan/clock_plugged
name: Clock Plugged
retain: true
emulated_hue_hidden: True
hidden: False
light:
- platform: mqtt_json
name: Clock Screensaver
state_topic: floorplan/clock_screensaver
command_topic: floorplan/clock_screensaver/set
brightness: true
sensor:
- platform: mqtt
state_topic: "clock/stacey_alarm_time"
name: clock_stacey_alarm_time
retain: true
emulated_hue_hidden: True
hidden: true
input_boolean:
clock_snooze:
name: Clock Snooze
initial: off
automation:
- alias: 'Snooze Button off in 10 minutes'
trigger:
- platform: state
entity_id:
- input_boolean.clock_snooze
to: 'on'
from: 'off'
action:
- delay:
minutes: 10
- service: input_boolean.turn_off
entity_id: input_boolean.clock_snooze
#Turn on the clock - turn off the screensaver so we can see it.
- alias: Turn off Screensaver so we can see the time
trigger:
- platform: state
entity_id:
- binary_sensor.sleepnumber_carlo_carlo_is_in_bed
- binary_sensor.sleepnumber_carlo_stacey_is_in_bed
- light.bedroom_screensaver
to: 'off'
action:
- service: light.turn_off
entity_id: light.clock_screensaver
- wait_template: "{{ is_state(trigger.entity_id, 'on') }}"
- service: light.turn_on
entity_id: light.clock_screensaver
#-----Turn on the Music--------------------------------------
- alias: 'Play Radio when Snooze button is turned off.'
trigger:
- platform: state
entity_id:
- input_boolean.clock_snooze
to: 'off'
from: 'on'
- platform: template
value_template: '{{states.sensor.time.state == states.sensor.clock_stacey_alarm_time.state}}'
condition:
- condition: state
entity_id: input_boolean.school_mode
state: 'on'
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
- condition: state
entity_id: group.family
state: 'home'
action:
- service: media_player.volume_set
data_template:
entity_id:
- media_player.alarm_clock
volume_level: 0.3
- service: media_player.play_media
data_template:
entity_id:
- media_player.alarm_clock
#media_content_id: "http://listen.181fm.com/181-kickincountry_128k.mp3"
media_content_id: "http://listen.djcmedia.com:80/americascountryhigh"
media_content_type: audio/mp4
- service: light.turn_off
entity_id: light.clock_screensaver
#-----Turn off the Music--------------------------------------
- alias: 'Turn off the Radio when the snooze is turned on.'
trigger:
- platform: state
entity_id:
- input_boolean.clock_snooze
to: 'on'
from: 'off'
action:
- service: media_player.media_stop
entity_id: media_player.alarm_clock

58
packages/battery_levels.yaml Executable file
View File

@@ -0,0 +1,58 @@
#-------------------------------------------
# Fire Tablet Alarm Panel -
# http://www.vmwareinfo.com/2017/07/visualizing-smart-home-using-home.html
#-------------------------------------------
#
# homeassistant:
# customize_glob:
# "sensor.*_alarm_panel*":
# emulated_hue_hidden: True
# hidden: False
# "binary_sensor.*_alarm_panel*":
# emulated_hue_hidden: True
# hidden: False
sensor:
- platform: template
sensors:
low_battery:
friendly_name: 'Low Battery'
value_template: >
{%- set threshold = 15 -%}
{%- set domains = ['light', 'switch', 'sensor', 'zwave', 'lock', 'binary_sensor'] -%}
{%- for domain in domains -%}
{%- for item in states[domain] if ((item.attributes.battery_level is defined and item.attributes['battery_level'] | int < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown"))) -%}
{{ item.attributes.friendly_name }} (
{%- if item.attributes.battery_level is defined -%}
{{ item.attributes.battery_level}}
{%- else -%}
{{item.state}}
{%- endif -%}%)
{%- if not loop.last -%}
{{', '}}
{%- endif -%}
{%- endfor -%}
{%- endfor -%}
automation:
- alias: 'Battery Alert'
initial_state: 'on'
trigger:
- platform: time
at: '10:00:00'
- platform: time
at: '18:00:00'
condition:
condition: template
value_template: "{% if states('sensor.low_battery') %}true{% endif %}"
action:
- service: persistent_notification.create
data_template:
title: Low Battery
message: "{{ states('sensor.low_battery') }}"
notification_id: low-battery-alert
- service: script.notify_engine
data_template:
value1: "Low battery levels: {{ states('sensor.low_battery') }}"
who: 'carlo'

90
packages/epson_printer.yaml Executable file
View File

@@ -0,0 +1,90 @@
#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# inspired by https://community.home-assistant.io/t/epson-wf-3540-ink-level-monitoring/21813
#-------------------------------------------
homeassistant:
customize_glob:
"sensor.epson_ink_level_*":
icon: mdi:cup-water
emulated_hue_hidden: True
hidden: False
homebridge_hidden: True
#-------------------------------------------
sensor:
- platform: command_line
name: Epson Ink Level Black
command: /usr/bin/curl -X GET http://192.168.10.105/PRESENTATION/HTML/TOP/PRTINFO.HTML | awk -F"'" '/Ink_K.PNG/ && $6+0 == $6 { printf "%.0f\n", $6 / 50 * 100; exit }'
unit_of_measurement: '%'
scan_interval: 14400
- platform: command_line
name: Epson Ink Level Magenta
command: /usr/bin/curl -X GET http://192.168.10.105/PRESENTATION/HTML/TOP/PRTINFO.HTML | awk -F"'" '/Ink_M.PNG/ && $6+0 == $6 { printf "%.0f\n", $6 / 50 * 100 }'
unit_of_measurement: '%'
scan_interval: 14400
- platform: command_line
name: Epson Ink Level Yellow
command: /usr/bin/curl -X GET http://192.168.10.105/PRESENTATION/HTML/TOP/PRTINFO.HTML | awk -F"'" '/Ink_Y.PNG/ && $6+0 == $6 { printf "%.0f\n", $6 / 50 * 100 }'
unit_of_measurement: '%'
scan_interval: 14400
- platform: command_line
name: Epson Ink Level Cyan
command: /usr/bin/curl -X GET http://192.168.10.105/PRESENTATION/HTML/TOP/PRTINFO.HTML | awk -F"'" '/Ink_C.PNG/ && $6+0 == $6 { printf "%.0f\n", $6 / 50 * 100 }'
unit_of_measurement: '%'
scan_interval: 14400
- platform: command_line
name: Epson Ink Level Photo Black
command: /usr/bin/curl -X GET http://192.168.10.105/PRESENTATION/HTML/TOP/PRTINFO.HTML | awk -F"'" '/Ink_K.PNG/ {i++}i==2 && $6+0 == $6 { printf "%.0f\n", $6 / 50 * 100; exit }'
unit_of_measurement: '%'
scan_interval: 14400
#-------------------------------------------
group:
epson_printer:
name: Epson Printer Info
control: hidden
entities:
- sensor.epson_ink_level_black
- sensor.epson_ink_level_cyan
- sensor.epson_ink_level_magenta
- sensor.epson_ink_level_yellow
- sensor.epson_ink_level_photo_black
#-------------------------------------------
##############################################################################
### Automations - Detect when things are not right. Like any Good Watchdog.
##############################################################################
automation:
- alias: 'Printer Ink Alert'
initial_state: 'on'
trigger:
- platform: numeric_state
entity_id:
- sensor.epson_ink_level_black
- sensor.epson_ink_level_magenta
- sensor.epson_ink_level_photo_black
- sensor.epson_ink_level_yellow
- sensor.epson_ink_level_cyan
below: 25
condition:
condition: time
weekday:
- wed
action:
- service: persistent_notification.create
data_template:
title: Low Ink
message: "{{ trigger.to_state.attributes.friendly_name }} is at {{ trigger.to_state.state }} "
notification_id: low-battery-alert
- service: script.notify_engine
data_template:
value1: "{{ trigger.to_state.attributes.friendly_name }} is at {{ trigger.to_state.state }} "
who: 'carlo'
- service: script.tweet_engine
data:
tweet: 'Looks like my {{ trigger.to_state.attributes.friendly_name }} is LOW. @CCostan - Get me some more (http://amzn.to/2AnpFwD)'
#-------------------------------------------

38
packages/fire_tablet.yaml Executable file
View File

@@ -0,0 +1,38 @@
#-------------------------------------------
# Global Fire Tablet settings -
# http://www.vmwareinfo.com/2017/07/visualizing-smart-home-using-home.html
#-------------------------------------------
# We block the auto adjust brightness routines for the tablets.
# Use ALARM and Floorplan for the security system.
group:
firetablets:
entities:
- binary_sensor.bedroom_motion
- binary_sensor.bedroom_plugged
- binary_sensor.clock_motion
- binary_sensor.clock_plugged
# automation:
#
# - alias: 'Enable battery help!'
# trigger:
# - platform: state
# entity_id:
# - binary_sensor.clock_plugged
# - binary_sensor.bedroom_plugged
# to: 'off'
# from: 'on'
#
# - alias: 'Cry when the Battery is about to die. '
# trigger:
# - platform: state
# entity_id:
# - input_boolean.clock_snooze
# to: 'on'
# from: 'off'
# action:
# - delay:
# minutes: 10
# - service: input_boolean.turn_off
# entity_id: input_boolean.clock_snooze

64
packages/fitbit.yaml Executable file
View File

@@ -0,0 +1,64 @@
#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# Neato Support for D7 Connected Botvac - control my [Neato Vacuum](http://amzn.to/2kqnnqu) with Home Assistant.
#-------------------------------------------
# homeassistant:
# customize_glob:
# "*.*_sleep_hours":
# unit_of_measurement: hours
# icon: mdi:sleep
# emulated_hue_hidden: True
# hidden: False
#-------------------------------------------
sensor:
- platform: fitbit
clock_format: 12H
monitored_resources:
- "body/weight"
- "activities/steps"
- "devices/battery"
#-------------------------------------------
group:
fitbit:
entities:
- sensor.steps
- sensor.weight
- sensor.one_battery
##############################################################################
### Automations - Detect when things are not right. Like any Good Watchdog.
##############################################################################
automation:
- alias: 'Missing Fitbit Alert'
initial_state: 'on'
trigger:
- platform: time
at: '11:00:00'
condition:
condition: template
value_template: >
{%- if sensor.steps < 1000 -%}
true
{%- endif -%}
action:
- service: script.notify_engine
data_template:
value1: "Your current fitbit steps are {{ states('sensor.steps') }} - You probably do not have it."
who: 'carlo'
- alias: 'Fitbit 10k'
initial_state: 'on'
trigger:
- platform: numeric_state
entity_id: sensor.steps
above: 10000
action:
- service: script.tweet_engine
data_template:
tweet: >
{{ [
"Somebody just hit {{ states('sensor.steps') }} steps on the #Fitbit!",
"Keep on moving. Somebody just hit {{ states('sensor.steps') }} steps.",
"#Fitness Tracking at home BY the home. Somebody just hit {{ states('sensor.steps') }} steps"
] | random + " Battery Level:{{ states('sensor.one_battery') }} #Self #Data"}}

44
packages/floorplan.yaml Executable file
View File

@@ -0,0 +1,44 @@
#-------------------------------------------
# Fire Tablet Alarm Panel -
# http://www.vmwareinfo.com/2017/07/visualizing-smart-home-using-home.html
#-------------------------------------------
#
homeassistant:
customize_glob:
"sensor.*_alarm_panel*":
emulated_hue_hidden: True
hidden: False
"binary_sensor.*_alarm_panel*":
emulated_hue_hidden: True
hidden: False
media_player:
- platform: floorplan_speaker
name: Bedroom Alarm Panel
#---Sensors for Fire Tablet-----------------------------
light:
- platform: mqtt_json
name: Bedroom Screensaver
state_topic: floorplan/bedroom_screensaver
command_topic: floorplan/bedroom_screensaver/set
brightness: true
binary_sensor:
- platform: mqtt
state_topic: floorplan/bedroom_motion
name: Bedroom Motion
device_class: motion
retain: true
emulated_hue_hidden: True
hidden: False
- platform: mqtt
state_topic: floorplan/bedroom_plugged
name: Bedroom Plugged
retain: true
emulated_hue_hidden: True
hidden: False

47
packages/hasspodcast.yaml Executable file
View File

@@ -0,0 +1,47 @@
#-------------------------------------------
# RSS Podcast Alerting function Packages
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
#-------------------------------------------
#-------------------------------------------
feedreader:
urls:
- https://hasspodcast.io/feed/podcast
#-------------------------------------------
automation:
- alias: Send notification of RSS feed title when updated
trigger:
platform: event
event_type: feedreader
action:
- service: script.notify_engine
data_template:
value1: 'There is a new HA Podcast available for {{trigger.event.data.title}}.'
value2: 'https://hasspodcast.io/'
who: 'carlo'
- service: notify.html5
data_template:
title: "New HA Podcast available"
message: "New HA Podcast - {{ as_timestamp(now()) | timestamp_custom('%I:%M:%S %p %d%b%Y', true) }} {{trigger.event.data.title}}"
data:
url: "https://hasspodcast.io/"
- service: persistent_notification.create
data_template:
title: "{{trigger.event.data.title}}"
message: "New Podcast available - {{ as_timestamp(now()) | timestamp_custom('%I:%M:%S %p %d%b%Y', true) }}"
notification_id: "update_available"
- service: script.tweet_engine
data_template:
tweet: >
{{ [
"There is a new HA Podcast available! @DanGeek, @rohank9, @philhawthorne & Crew rock it out (#HomeAutomation Style!)!",
"Mine and @DanGeek Favorite Podcast just came out!",
"Listen to @rohank9 and the HA Podcast crew on thier new #HomeAutomation episode!",
"Mine & @CCostan Favorite Podcast just came out! Thanks @DanGeek!"
] | random + "(https://hasspodcast.io/)"}}

91
packages/holiday.yaml Executable file
View File

@@ -0,0 +1,91 @@
###############################################################################
# @author : Mahasri Kalavala
# @date : 10/28/2017
# @package : Holidays
# @description : Retrieves the holiday
###############################################################################
## Modified for my own fun stuff!
homeassistant:
customize:
sensor.holiday:
hidden: true
icon: mdi:beach
friendly_name: US Holiday
sensor.flag:
hidden: true
icon: mdi:flag
friendly_name: Flag Day
###############################################################################
# Sensor updates once every 4 hours (14400 seconds) & runs 6 times in 24 hours
#
# First it checks for holiday in static section, if that doesn't exist,
# it checks in the dynamic section. If neither exists, the value will be empty
###############################################################################
sensor:
- platform: rest
resource: https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/json_data/holidays.json
name: Holiday
scan_interval: 14400
value_template: >
{% set today = now().month ~ '/' ~ now().day %}
{% set holiday = value_json.MAJOR_US.static[ today ] %}
{% if holiday | trim == "" %}
{% set today = now().month ~ '/' ~ now().day ~ '/' ~ now().year %}
{% set holiday = value_json.MAJOR_US.dynamic[ today ] %}
{% endif %}
{{ holiday }}
- platform: rest
resource: http://www.webcal.fi/cal.php?id=335&format=json&start_year=current_year&end_year=2017&tz=America%2FNew_York
name: Flag
scan_interval: 14400
value_template: >-
{% set is_flag_day = False %}
{%- for day_val in value_json -%}
{% set now_string = now().strftime('%Y-%m-%d') %}
{%- if day_val.date == now_string and day_val.flag_day == 1-%}
{% set is_flag_day = True %}
{%- endif -%}
{% endfor %}
{{is_flag_day}}
###############################################################################
# Automation that notifies of a Holiday "state" change
###############################################################################
automation:
- alias: Notify Holiday State Change
hide_entity: false
initial_state: true
trigger:
- platform: state
entity_id:
- sensor.holiday
condition:
- condition: template
value_template: "{{ states('sensor.holiday') != 'unknown' }}"
- condition: template
value_template: "{{ states.sensor.holiday.state | trim != '' }}"
action:
- service: persistent_notification.create
data:
message: 'Today is {{ states.sensor.holiday.state }}.'
title: '{{ states.sensor.holiday.state }}'
- delay: '{{ (range(4, 8)|random|int) }}:{{ (range(1, 50)|random|int) }}:00'
- service: script.tweet_engine
data_template:
tweet: >
{{ [
"Today is {{ states.sensor.holiday.state }}. Time to adjust the outside light colors!",
"Today is {{ states.sensor.holiday.state }}.",
"Is today {{ states.sensor.holiday.state }}?",
"Just checked with Alexa & today is {{ states.sensor.holiday.state }}."
] | random + [
" #DayOff",
"(http://www.vmwareinfo.com/2017/07/my-smart-home-look-at-parts-that-make.html)",
"(http://www.vmwareinfo.com/2017/08/diy-outdoor-smart-home-led-strips.html)",
"#{{ states.sensor.holiday.state }}"
] | random }}

110
packages/ios.yaml Executable file
View File

@@ -0,0 +1,110 @@
#-------------------------------------------
# Realtime Debugging Related Packages
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
#-------------------------------------------
homeassistant:
customize_glob:
"sensor.carlo_6*":
emulated_hue_hidden: True
"sensor.staceys_iphone_*":
emulated_hue_hidden: True
group:
Phones:
entities:
- sensor.carlo_6s_battery_level
- sensor.carlo_6s_battery_state
- sensor.staceys_iphone_battery_level
- sensor.staceys_iphone_battery_state
ios:
push:
categories:
- name: Medicine
identifier: 'tablet'
actions:
- identifier: 'TABLET_TAKEN'
title: 'Tablet Taken'
activationMode: 'background'
authenticationRequired: no
destructive: yes
- identifier: 'NOT_HOME'
title: 'I am not Home'
activationMode: 'background'
authenticationRequired: no
destructive: no
## - Reminders to take my medicine
input_boolean:
medicine:
name: Medicine Reminder
initial: off
icon: mdi:tablet
automation:
- alias: Tablet Already taken
trigger:
platform: event
event_type: ios.notification_action_fired
event_data:
actionName: TABLET_TAKEN
action:
- service: notify.ios_carlo_6s
data:
message: "Great job!"
- service: input_boolean.turn_on
entity_id: input_boolean.medicine
- alias: Remind Me Later
trigger:
platform: event
event_type: ios.notification_action_fired
event_data:
actionName: NOT_HOME
action:
- service: notify.ios_carlo_6s
data:
message: "Ok. I will remind you when you get home."
- wait_template: >-
{{ states.device_tracker.carlo.state == 'home' }}
- service: notify.ios_carlo_6s
data:
message: "Now that your home, please take your medicine!"
- alias: Medicine Reminder
initial_state: true
trigger:
- platform: time
minutes: '45'
seconds: '00'
- platform: time
at: '21:30:00'
- platform: state
entity_id: device_tracker.carlo
to: 'home'
condition:
- condition: time
after: '21:30:00'
- condition: state
entity_id: device_tracker.carlo
state: 'home'
- condition: state
entity_id: input_boolean.medicine
state: 'off'
action:
- service: notify.ios_carlo_6s
data:
title: "Medicine Alert!"
message: "Please take your Medicine!"
data:
push:
category: "tablet"
action_data:
entity_id: light.test
my_custom_data: foo_bar
## Reminders to take my Medicine! - End.

79
packages/juicenet.yaml Executable file
View File

@@ -0,0 +1,79 @@
#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# Neato Support for D7 Connected Botvac - control my [Neato Vacuum](http://amzn.to/2kqnnqu) with Home Assistant.
#-------------------------------------------
homeassistant:
customize_glob:
"*.carlojuice*":
emulated_hue_hidden: True
homebridge_hidden: True
hidden: False
#-------------------------------------------
juicenet:
access_token: !secret juicenet_access_token
group:
juicenet:
name: JuiceBox Charger
control: hidden
entities:
- sensor.carlojuice_amps
- sensor.carlojuice_charge_time
- sensor.carlojuice_charging_status
- sensor.carlojuice_energy_added
- sensor.carlojuice_temperature
- sensor.carlojuice_voltage
- sensor.carlojuice_watts
#############################################################################
### Automations - Alerts related to the JuiceBox (http://amzn.to/2AZVQ37)
##############################################################################
automation:
- alias: 'Car Charging Alerts'
initial_state: 'on'
trigger:
- platform: state
entity_id: sensor.carlojuice_charging_status
action:
- service: script.notify_engine
data_template:
value1: "The Garage charger is now in {{ states('sensor.carlojuice_charging_status') }} mode."
who: 'parents'
- alias: 'JuiceBox AMP Alert!'
initial_state: 'on'
trigger:
- platform: numeric_state
entity_id: sensor.carlojuice_amps
above: 24
action:
- service: input_boolean.turn_on
entity_id: input_boolean.alert_mode
- service: script.notify_engine
data_template:
value1: "The Juice Box Charger is pulling {{ states('sensor.carlojuice_amps') }} AMPs. This is above the safety mark of 30. Please unplug charger immediately."
who: 'parents'
- service: script.speech_engine
data_template:
value1: "The Juice Box Charger is pulling {{ states('sensor.carlojuice_amps') }} AMPs. This is above the safety mark of 30. Please unplug charger immediately."
- alias: 'JuiceBox Tweet Stat!'
initial_state: 'on'
trigger:
- platform: state
entity_id: sensor.carlojuice_charging_status
from: 'charging'
action:
- delay: '0{{ range(0,4) | random | int }}:00:00'
- service: script.tweet_engine
data_template:
tweet: >
{{ [
"The #Chevy Bolt Charged for {{(states.sensor.carlojuice_charge_time.state | int /60) | round() }} minutes and Juiced up add {{states.sensor.carlojuice_energy_added.state |int /1000}} KwHs.",
"The last charging session was {{(states.sensor.carlojuice_charge_time.state | int /60) | round() }} minutes. Added {{states.sensor.carlojuice_energy_added.state |int /1000}} KwHs ",
"The Juice Box Pro add {{states.sensor.carlojuice_energy_added.state |int /1000}} KwHs to the #Chevy #BoltEV in {{(states.sensor.carlojuice_charge_time.state | int /60) | round() }} minutes."
] | random + " (http://amzn.to/2zlQIUI) #Electric #Solar"}}

View File

@@ -0,0 +1,55 @@
#-------------------------------------------
# Landscape Lighting Packages
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
#-------------------------------------------
homeassistant:
customize:
switch.back_landscaping:
friendly_name: 'Back Landscaping'
icon: mdi:flower
emulated_hue_hidden: False
hidden: False
switch.front_landscaping:
friendly_name: 'Front Landscaping'
icon: mdi:flower
emulated_hue_hidden: False
hidden: False
group.landscaping:
friendly_name: 'Landscaping Lights'
emulated_hue_hidden: False
hidden: False
#-------------------------------------------
group:
landscaping:
entities:
- switch.front_landscaping
- switch.back_landscaping
#-------------------------------------------
# Automation : Added to Sunset_ON
# Automation : Added to Sunset_OFF
# Automation : Added to Away. (Switches off Back Landscaping)
# Automation : Added to Late Night Helper Outside (Switches Back lights on)
automation:
- alias: 'Back Landscape lights off'
trigger:
- platform: state
entity_id:
- binary_sensor.sleepnumber_carlo_carlo_is_in_bed
- binary_sensor.sleepnumber_carlo_stacey_is_in_bed
to: 'on'
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
- condition: state
entity_id: binary_sensor.sleepnumber_carlo_carlo_is_in_bed
state: 'on'
- condition: state
entity_id: binary_sensor.sleepnumber_carlo_stacey_is_in_bed
state: 'on'
action:
- service: switch.turn_off
entity_id: switch.back_landscaping

19
packages/light_sensor.yaml.old Executable file
View File

@@ -0,0 +1,19 @@
#-------------------------------------------
# Bruh Light Sensor Related Packages
#-------------------------------------------
#------LightSensor Node---http://amzn.to/2oUgj5i
homeassistant:
customize:
sensor.sn1_ldr:
icon: mdi:sensor
friendly_name: Light Sensor
#emulated_hue_hidden: False
hidden: False
#---Sensor for Light-----------------------------
sensor:
- platform: mqtt
state_topic: "home/sensornode1"
name: "SN1 LDR"
##This sensor is not calibrated to actual LUX. Rather, this a map of the input voltage ranging from 0 - 1023.
unit_of_measurement: "LUX"
value_template: '{{ value_json.ldr }}'

46
packages/logger.yaml Executable file
View File

@@ -0,0 +1,46 @@
#-------------------------------------------
# Realtime Debugging Related Packages
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
#-------------------------------------------
homeassistant:
customize_glob:
"input_select.log_*":
icon: mdi:bug
emulated_hue_hidden: True
hidden: False
#-------------------------------------------
input_select:
log_level:
name: Log Level
options:
- critical
- fatal
- error
- warning
- warn
- info
- debug
- notset
initial: warn
###################################
## Dynamically set the log levels without having to restart HASS or edit configuration.yaml
#- Thanks @VDRainer
###################################
automation:
- alias: Log Level
trigger:
platform: state
entity_id:
- input_select.log_level
# - input_select.log_component
action:
- service: logger.set_level
data_template:
homeassistant.components: "{{ states.input_select.log_level.state }}"
- service: script.tweet_engine
data:
tweet: "My logging level has just been set to {{ states.input_select.log_level.state }}"

48
packages/neato.yaml Executable file
View File

@@ -0,0 +1,48 @@
#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# Neato Support for D7 Connected Botvac - control my [Neato Vacuum](http://amzn.to/2kqnnqu) with Home Assistant.
#-------------------------------------------
# homeassistant:
# customize_glob:
# "*.*_sleep_hours":
# unit_of_measurement: hours
# icon: mdi:sleep
# emulated_hue_hidden: True
# hidden: False
#-------------------------------------------
neato:
username: !secret neato_username
password: !secret neato_password
#-------------------------------------------
group:
Neato:
entities:
- camera.carloneato_cleaning_map
- switch.carloneato_schedule
- vacuum.carloneato
##############################################################################
### Automations - Detect when things are not right. Like any Good Watchdog.
##############################################################################
automation:
- alias: 'Vacuum -Tweet'
trigger:
- platform: state
entity_id: vacuum.carloneato
to: 'off'
from: 'on'
condition:
- condition: template
value_template: "{{ states.vacuum.carloneato.attributes.battery_level |int < 20 }}"
action:
- service: script.tweet_engine
data_template:
tweet: >
{{ [
"#Neato returning to base. Vacuumed up a TON. (http://amzn.to/2CKHZya)",
"Everyday I have the Neato Botvac go out and clean the house on its own.",
"Since we have a cat that sheds all day, we have @Neato go out daily to clean.",
"Time to recharge the @Neato Vacuum."
] | random + " Battery Level:{{states.vacuum.carloneato.attributes.battery_level }} #Robots"}}

141
packages/nest_protects.yaml Executable file
View File

@@ -0,0 +1,141 @@
######################################################################################################
# Nest Protect Package
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# - Write up- http://www.vmwareinfo.com/2017/06/psa-check-out-your-smoke-detectors-once.html
######################################################################################################
#-----------------------------------
homeassistant:
customize:
binary_sensor.hallway_nest_protect_kids_hallway_online:
friendly_name: Kids Hallway Protect
icon: mdi:nest-protect
binary_sensor.justins_room_nest_protect_online:
friendly_name: Justins Room Protect
icon: mdi:nest-protect
binary_sensor.kitchen_nest_protect_online:
friendly_name: Kitchen Protect
icon: mdi:nest-protect
binary_sensor.master_bedroom_nest_protect_online:
friendly_name: Master Bedroom Protect
icon: mdi:nest-protect
binary_sensor.master_hallway_nest_protect_online:
friendly_name: Master Hallway Protect
icon: mdi:nest-protect
binary_sensor.paiges_room_nest_protect_paiges_room_online:
friendly_name: Paiges Room Protect
icon: mdi:nest-protect
binary_sensor.upstairs_bedroom_nest_protect_online:
friendly_name: Upstairs Bedroom Protect
icon: mdi:nest-protect
binary_sensor.upstairs_living_room_nest_protect_online:
friendly_name: Upstairs Living Room Protect
icon: mdi:nest-protect
binary_sensor.office_nest_protect_online:
friendly_name: Office Protect
icon: mdi:nest-protect
group.protects:
homebridge_hidden: true
#-------------------------------------------
#-------------------------------------------
group:
protects:
name: Nest Protects
entities:
- binary_sensor.upstairs_living_room_nest_protect_online
- binary_sensor.hallway_nest_protect_kids_hallway_online
- binary_sensor.justins_room_nest_protect_online
- binary_sensor.kitchen_nest_protect_online
- binary_sensor.master_bedroom_nest_protect_online
- binary_sensor.master_hallway_nest_protect_online
- binary_sensor.paiges_room_nest_protect_paiges_room_online
- binary_sensor.upstairs_bedroom_nest_protect_online
- binary_sensor.office_nest_protect_online
#-------------------------------------------
automation:
- alias: Nest protect emergency
hide_entity: true
trigger:
platform: state
entity_id:
- sensor.hallway_nest_protect_kids_hallway_smoke_status
- sensor.hallway_nest_protect_kids_hallway_co_status
- sensor.justins_room_nest_protect_smoke_status
- sensor.justins_room_nest_protect_co_status
- sensor.kitchen_nest_protect_smoke_status
- sensor.kitchen_nest_protect_co_status
- sensor.master_bedroom_nest_protect_smoke_status
- sensor.master_bedroom_nest_protect_co_status
- sensor.master_hallway_nest_protect_smoke_status
- sensor.master_hallway_nest_protect_co_status
- sensor.office_nest_protect_smoke_status
- sensor.office_nest_protect_co_status
- sensor.paiges_room_nest_protect_paiges_room_smoke_status
- sensor.paiges_room_nest_protect_paiges_room_co_status
- sensor.upstairs_bedroom_nest_protect_smoke_status
- sensor.upstairs_bedroom_nest_protect_co_status
- sensor.upstairs_living_room_nest_protect_smoke_status
- sensor.upstairs_living_room_nest_protect_co_status
to: 'Emergency'
condition:
- condition: state
entity_id: group.family
state: 'home'
action:
- service: script.emergency
data_template:
call_garage_open: 1
- service: script.notify_engine
data_template:
value1: "An emergency has been detected on {{ trigger.to_state.attributes.friendly_name }} Please investigate IMMEDIATELY."
- service: script.tweet_engine
data_template:
tweet: "An emergency has been detected on {{ trigger.to_state.attributes.friendly_name }} @CCostan (http://www.vmwareinfo.com/2017/06/psa-check-out-your-smoke-detectors-once.html)"
- alias: Nest Protect Offline Notify
hide_entity: true
trigger:
platform: state
entity_id:
- binary_sensor.upstairs_living_room_nest_protect_online
- binary_sensor.hallway_nest_protect_kids_hallway_online
- binary_sensor.justins_room_nest_protect_online
- binary_sensor.kitchen_nest_protect_online
- binary_sensor.master_bedroom_nest_protect_online
- binary_sensor.master_hallway_nest_protect_online
- binary_sensor.paiges_room_nest_protect_paiges_room_online
- binary_sensor.upstairs_bedroom_nest_protect_online
- binary_sensor.office_nest_protect_online
from: 'on'
action:
- service: input_boolean.turn_on
entity_id: input_boolean.alert_mode
- service: script.speech_engine
data_template:
value1: "The {{ trigger.to_state.attributes.friendly_name }} is now {{ (trigger.to_state.state)|replace('_', ' ') }}. Please check immediately."
- service: script.notify_engine
data_template:
value1: "The {{ trigger.to_state.attributes.friendly_name }} is now {{ (trigger.to_state.state)|replace('_', ' ') }}. Please check immediately."
who: "parents"
- service: script.tweet_engine
data:
tweet: "Oh NO! {{ trigger.to_state.attributes.friendly_name }} is now in {{ (trigger.to_state.state)|replace('_', ' ') }} mode. @Nest. (http://www.vmwareinfo.com/2017/06/psa-check-out-your-smoke-detectors-once.html) #Safety"

218
packages/network.yaml Executable file
View File

@@ -0,0 +1,218 @@
#-------------------------------------------
# Network Related Packages
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
#-------------------------------------------
#-------------------------------------------
sensor:
- platform: template
sensors:
wii:
friendly_name: 'Wii'
value_template: "{{ 'Online' if is_state('device_tracker.wii', 'home') else 'Offline' }}"
tablotv:
friendly_name: 'Tablo TV'
value_template: "{{ 'Online' if is_state('device_tracker.tablotv', 'home') else 'Offline' }}"
study_ap:
friendly_name: 'Unifi Study AP'
value_template: "{{ 'Online' if is_state('device_tracker.study_ap', 'home') else 'Offline' }}"
unifi_ap:
friendly_name: 'Unifi Office AP'
value_template: "{{ 'Online' if is_state('device_tracker.unifi_ap', 'home') else 'Offline' }}"
hue_hub_1:
friendly_name: 'Hue Hub 1'
value_template: "{{ 'Online' if is_state('device_tracker.hue_hub_1', 'home') else 'Offline' }}"
hue_hub_2:
friendly_name: 'Hue Hub 2'
value_template: "{{ 'Online' if is_state('device_tracker.hue_hub_2', 'home') else 'Offline' }}"
bedroom_alarm_panel:
friendly_name: 'Bedroom Alarm Panel'
value_template: "{{ 'Online' if is_state('device_tracker.bedroom_alarm_panel', 'home') else 'Offline' }}"
entry_alarm_panel:
friendly_name: 'Entry Alarm Panel'
value_template: "{{ 'Online' if is_state('device_tracker.entry_alarm_panel', 'home') else 'Offline' }}"
alexa_echo:
friendly_name: 'Alexa Echo'
value_template: "{{ 'Online' if is_state('device_tracker.alexa_echo', 'home') else 'Offline' }}"
amazon_dot:
friendly_name: 'Amazon Dot'
value_template: "{{ 'Online' if is_state('device_tracker.amazon_dot', 'home') else 'Offline' }}"
amazon_fire_stick:
friendly_name: 'Amazon Fire Stick'
value_template: "{{ 'Online' if is_state('device_tracker.amazon_fire_stick', 'home') else 'Offline' }}"
printer:
friendly_name: 'Printer'
value_template: "{{ 'Online' if is_state('device_tracker.printer', 'home') else 'Offline' }}"
circle:
friendly_name: 'Disney Circle'
value_template: "{{ 'Online' if is_state('device_tracker.circle', 'home') else 'Offline' }}"
nest_downstairs:
friendly_name: 'Downstairs Nest'
value_template: "{{ 'Online' if is_state('device_tracker.nest_downstairs', 'home') else 'Offline' }}"
nest_upstairs:
friendly_name: 'Upstairs Nest'
value_template: "{{ 'Online' if is_state('device_tracker.nest_upstairs', 'home') else 'Offline' }}"
rachio:
friendly_name: 'Rachio Sprinklers'
value_template: "{{ 'Online' if is_state('device_tracker.rachio', 'home') else 'Offline' }}"
samsungtv:
friendly_name: 'Samsung TV'
value_template: "{{ 'Online' if is_state('device_tracker.samsungtv', 'home') else 'Offline' }}"
chromecast_audio_1:
friendly_name: 'ChromeCast Audio 1'
value_template: "{{ 'Online' if is_state('device_tracker.chromecast_audio_1', 'home') else 'Offline' }}"
chromecast_audio_2:
friendly_name: 'ChromeCast Audio 2'
value_template: "{{ 'Online' if is_state('device_tracker.chromecast_audio_2', 'home') else 'Offline' }}"
large_garage:
friendly_name: 'Large Garage'
value_template: "{{ 'Online' if is_state('device_tracker.large_garage', 'home') else 'Offline' }}"
small_garage:
friendly_name: 'Small Garage'
value_template: "{{ 'Online' if is_state('device_tracker.small_garage', 'home') else 'Offline' }}"
rgb_led_outdoor_den:
friendly_name: 'RGB LED Outdoor Den'
value_template: "{{ 'Online' if is_state('device_tracker.rgb_led_outdoor_den', 'home') else 'Offline' }}"
rgb_led_garage_large:
friendly_name: 'RGB LED Garage Large'
value_template: "{{ 'Online' if is_state('device_tracker.rgb_led_garage_large', 'home') else 'Offline' }}"
rgb_led_garage_small:
friendly_name: 'RGB LED Garage Small'
value_template: "{{ 'Online' if is_state('device_tracker.rgb_led_garage_small', 'home') else 'Offline' }}"
smart_water_meter:
friendly_name: 'Smart Water Meter'
value_template: "{{ 'Online' if is_state('device_tracker.smart_water_meter', 'home') else 'Offline' }}"
sleep_number_bed:
friendly_name: 'Sleep Number Bed'
value_template: "{{ 'Online' if is_state('device_tracker.sleep_number_bed', 'home') else 'Offline' }}"
withings_scale:
friendly_name: 'WiThings Scale'
value_template: "{{ 'Online' if is_state('device_tracker.withings_scale', 'home') else 'Offline' }}"
#-------------------------------------------
group:
network:
entities:
- sensor.ha_installed_version
- sensor.ha_uptime
- sensor.since_last_boot_templated
- sensor.disk_used_
- sensor.speedtest_download
- sensor.speedtest_upload
- sensor.study_ap
- sensor.actiontechap
- sensor.unifi_ap
- sensor.wii
- sensor.hue_hub_1
- sensor.hue_hub_2
- binary_sensor.carlowink
- sensor.tablotv
- sensor.alexa_echo
- sensor.amazon_dot
- sensor.circle
- sensor.rachio
- sensor.skybell
- sensor.samsungtv
- sensor.chromecast_audio_1
- sensor.chromecast_audio_2
- sensor.amazon_fire_stick
- sensor.nest_upstairs
- sensor.nest_downstairs
- sensor.large_garage
- sensor.small_garage
- sensor.rgb_led_garage_large
- sensor.rgb_led_garage_small
- sensor.rgb_led_outdoor_den
- sensor.withings_scale
- sensor.smart_water_meter
- sensor.sleep_number_bed
- sensor.printer
- sensor.bedroom_alarm_panel
- sensor.entry_alarm_panel
- sensor.NodeMCU1
- sensor.NodeMCU2
- sensor.NodeMCU3
- sensor.carlopihole
#-------------------------------------------------------------------------------------
automation:
- alias: 'Device Status'
hide_entity: True
trigger:
- platform: state
entity_id:
- sensor.wii
- sensor.Hue_Hub_1
- sensor.Hue_Hub_2
- sensor.tablotv
- sensor.alexa_echo
- sensor.amazon_dot
- sensor.circle
- sensor.rachio
- sensor.skybell
- sensor.printer
- sensor.chromecast_audio_1
- sensor.chromecast_audio_2
- sensor.nest_upstairs
- sensor.nest_downstairs
- sensor.study_ap
- sensor.actiontechap
- sensor.trendnetap
- sensor.unifi_ap
- sensor.small_garage
- sensor.large_garage
- sensor.rgb_led_garage_large
- sensor.rgb_led_garage_small
- sensor.rgb_led_outdoor_den
#- sensor.withings_scale
- sensor.smart_water_meter
- sensor.sleep_number_bed
- sensor.bedroom_alarm_panel
- sensor.entry_alarm_panel
- sensor.nodemcu1
- sensor.nodemcu2
- sensor.nodemcu3
- sensor.carlopihole
to: 'offline'
for:
minutes: 5
action:
- service: script.notify_engine
data_template:
value1: 'Device Status:'
value2: "{{ trigger.to_state.attributes.friendly_name }} is "
value3: "{{ trigger.to_state.state }}"
who: 'carlo'
- service: script.speech_engine
data_template:
value1: "{{ trigger.to_state.attributes.friendly_name }} is now {{ trigger.to_state.state }}"

79
packages/office_motion.yaml Executable file
View File

@@ -0,0 +1,79 @@
#-------------------------------------------
# Motion Sensor in the office.
# Find more recipes @ https://github.com/CCOSTAN/Home-AssistantConfig
#-------------------------------------------
#------LightSensor Node---http://amzn.to/2oUgj5i
homeassistant:
customize:
binary_sensor.office_motion:
friendly_name: Office Motion Sensor
emulated_hue_hidden: True
hidden: False
#---Sensor for Light-----------------------------
binary_sensor:
- platform: mqtt
state_topic: "NodeMCU4/Motion/Motion"
name: "Office_Motion"
payload_on: 1
payload_off: 0
device_class: motion
# This boolean gets reset every night in the sunset automation.
# Gets turned on by dash button automation primarily.
input_boolean:
daylight_override:
name: Daylight Override
initial: off
automation:
- alias: 'Motion in the Office - Turn on Light'
trigger:
- platform: state
entity_id:
- binary_sensor.office_motion
to: 'on'
from: 'off'
condition:
- condition: state
entity_id: binary_sensor.sleepnumber_carlo_carlo_is_in_bed
state: 'off'
- condition: state
entity_id: group.family
state: 'home'
- condition: state
entity_id: light.office_lamp
state: 'off'
- condition: or
conditions:
- condition: time
after: '18:00:00'
- condition: state
entity_id: sun.sun
state: 'below_horizon'
- condition: state
entity_id: input_boolean.daylight_override
state: 'on'
action:
- service: light.turn_on
entity_id: light.office_lamp
- alias: 'Motion in the Office - Turn off Light'
trigger:
- platform: state
entity_id:
- binary_sensor.office_motion
to: 'off'
from: 'on'
for:
minutes: 3
condition:
- condition: state
entity_id: light.office_lamp
state: 'on'
action:
- service: light.turn_off
entity_id: light.office_lamp

124
packages/pihole.yaml Executable file
View File

@@ -0,0 +1,124 @@
#-------------------------------------------
# PiHole ad Blocking Related Packages
#-------------------------------------------
homeassistant:
customize:
sensor.pihole_ads_percentage_today:
friendly_name: Percentage of Ad Traffic Blocked
unit_of_measurement: '%'
icon: mdi:ticket-percent
sensor.pihole_domains_being_blocked:
friendly_name: Total Domains Blocking
icon: mdi:do-not-disturb
sensor.pihole_dns_unique_clients:
friendly_name: Unique Clients
icon: mdi:desktop-classic
sensor.pihole_ads_blocked_today:
friendly_name: Ads Blocked Today
icon: mdi:do-not-disturb
sensor.pihole_dns_queries_today:
friendly_name: DNS Queries Today
icon: mdi:note-text
sensor.carlopihole:
friendly_name: Pi Hole Server
icon: mdi:filter-variant
group.pihole:
homebridge_hidden: true
#-------------------------------------------
sensor:
- platform: pi_hole
host: 192.168.10.11
monitored_conditions:
- dns_queries_today
- ads_blocked_today
- ads_percentage_today
- unique_clients
######Custom Version sensor
# - platform: command_line
# command: "pihole -v -p -c"
# name: 'pihole_version_current'
# value_template: '{{ value[28:] }}'
# scan_interval: 86400
#
# - platform: command_line
# command: "pihole -v -p -l"
# name: 'pihole_version_latest'
# value_template: '{{ value[27:] }}'
# scan_interval: 86400
- platform: template
sensors:
carlopihole:
friendly_name: 'Carlo-PiHole'
value_template: "{{ 'Online' if is_state('device_tracker.carlopihole', 'home') else 'Offline' }}"
# pi_hole_version:
# value_template: "{%- if states.sensor.pihole_version_current.state == states.sensor.pihole_version_latest.state -%}{{states.sensor.pihole_version_current.state}} {% else %}{{states.sensor.pihole_version_latest.state}} Available{% endif%}"
# icon_template: >-
# {% if states.sensor.pihole_version_current.state == states.sensor.pihole_version_latest.state %}
# mdi:checkbox-marked
# {% else %}
# mdi:checkbox-blank-outline
# {% endif %}
# Pi-Hole switch
switch:
- platform: command_line
switches:
pihole_temp_disable:
command_on: "curl -X GET 'http://192.168.10.11/admin/api.php?enable&auth='"
command_off: "curl -X GET 'http://192.168.10.11/admin/api.php?disable=3600&auth='"
# command_state: "curl -X GET 'http://192.168.10.11/admin/api.php?status'| grep enabled"
# value_template: "{{ value_json.status == 'enabled' }}
#-------------------------------------------
group:
pihole:
entities:
- sensor.carlopihole
- sensor.pi_hole_version
- sensor.pihole_dns_unique_clients
- sensor.pihole_dns_queries_today
- sensor.pihole_ads_blocked_today
- sensor.pihole_ads_percentage_today
- sensor.pihole_ads_percentage_blocked_today
- switch.pihole_temp_disable
#-------------------------------------------
automation:
- alias: PiHole Daily stats Tweet!
trigger:
platform: time
at: '23:50:00'
action:
- delay: '00:{{ (range(1, 9)|random|int) }}:00'
- service: script.tweet_engine
data_template:
tweet: >
{{ [
"I blocked {{states.sensor.pihole_ads_blocked_today.state}} ads. That is {{states.sensor.pihole_ads_percentage_blocked_today.state}}% of my internet traffic.",
"Today was a good day! Why, you ask? Because I blocked {{states.sensor.pihole_ads_blocked_today.state}} ads via Pi-Hole!",
] | random + " #PiHole #Security Status:({{states.sensor.carlopihole.state}})"}}
- alias: PiHole Daily Client Tweet!
trigger:
platform: time
at: '04:30:00'
action:
- delay: '{{ (range(1, 6)|random|int) }}:{{ (range(1, 50)|random|int) }}:00'
- service: script.tweet_engine
data_template:
tweet: >
{{ [
"There are currently {{states.sensor.pihole_dns_unique_clients.state}} clients on my network.",
"As reported by #Ubiquity Routers, There are {{states.sensor.pihole_dns_unique_clients.state}} clients on my network.",
] | random + "#Security http://amzn.to/2D2AfXS"}}

106
packages/processmonitor.yaml Executable file
View File

@@ -0,0 +1,106 @@
#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
#-------------------------------------------
homeassistant:
customize:
sensor.process_mosquitto:
friendly_name: 'Mosquitto'
emulated_hue_hidden: True
hidden: False
sensor.process_homebridge:
friendly_name: 'Apple HomeKit'
emulated_hue_hidden: True
hidden: False
sensor.process_node:
friendly_name: 'Dash Button Monitor'
emulated_hue_hidden: True
hidden: False
group.processes:
homebridge_hidden: true
#-------------------------------------------
sensor:
- platform: systemmonitor
resources:
# - type: last_boot
- type: since_last_boot
- type: disk_use_percent
arg: /
- type: process
arg: mosquitto
- type: process
arg: homebridge
- type: process
arg: node
#-------------------------------------------
group:
processes:
name: Processes
control: hidden
entities:
- sensor.process_mosquitto
- sensor.process_homebridge
- sensor.process_node
#-------------------------------------------
##############################################################################
### Automations - Detect when things are not right. Like any Good Watchdog.
##############################################################################
automation:
- alias: 'Device Status'
hide_entity: True
trigger:
- platform: state
entity_id:
- sensor.process_mosquitto
- sensor.process_homebridge
- sensor.process_dasher
to: 'off'
for:
minutes: 1
action:
- service: script.notify_engine
data_template:
value1: 'Process Status:'
value2: "{{ trigger.to_state.attributes.friendly_name }} is "
value3: "{{ trigger.to_state.state }}"
who: 'carlo'
- service: script.tweet_engine
data:
tweet: "Oh NO! {{ trigger.to_state.attributes.friendly_name }} is now {{ trigger.to_state.state }}. #ProcessMonitor"
#-------------------------------------------
- alias: "Self Heal Disk Use Alarm"
trigger:
- platform: numeric_state
entity_id: sensor.disk_used_
above: 80
action:
- service: script.notify_engine
data_template:
value1: 'Hard Drive Monitor:'
value2: "Your harddrive is running out of Space! /dev/root:{{ states.sensor.disk_used_.state }}%!"
value3: 'Attempting to clean'
who: 'carlo'
- service: tts.clear_cache
- alias: "Disk Use Alarm"
trigger:
- platform: numeric_state
entity_id: sensor.disk_used_
above: 90
action:
- service: script.notify_engine
data_template:
value1: 'Hard Drive Monitor:'
value2: "Your harddrive is running out of Space! /dev/root:{{ states.sensor.disk_used_.state }}%!"
who: 'carlo'
- service: persistent_notification.create
data:
title: "Hard Drive Monitor:"
message: "Your harddrive is running out of Space! /dev/root:{{ states.sensor.disk_used_.state }}%!"
notification_id: "Critical Alert"

69
packages/radio.yaml Executable file
View File

@@ -0,0 +1,69 @@
#-------------------------------------------
# Radio Related Packages
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
#-------------------------------------------
#------Whole House Radio Enabled via Emulated Hue----------------------------
homeassistant:
customize:
input_boolean.house_station:
icon: mdi:radio
friendly_name: House Station
emulated_hue_hidden: False
hidden: False
#---Use this Boolean to trigger via GUI or Alexa------------------------------
input_boolean:
house_station:
name: House Station
initial: off
#Moved to the Alarm Clock Package.
# #-----Turn on the Music--------------------------------------
# automation:
# - alias: 'Play Americas Country on ChromeCast Audio'
#
# trigger:
# - platform: state
# entity_id:
# - input_boolean.house_station
# to: 'on'
# from: 'off'
#
# action:
# - service: media_player.turn_off
# entity_id: media_player.living_room_tv
#
# - service: media_player.turn_on
# entity_id: media_player.livingroomCC
#
# - service: media_player.volume_set
# entity_id:
# - media_player.livingroomCC
# data_template:
# volume_level: 0.2
#
# - service: media_player.play_media
# data_template:
# entity_id:
# - media_player.LivingRoomCC
# media_content_id: "http://listen.181fm.com/181-kickincountry_128k.mp3"
# #media_content_id: "http://listen.djcmedia.com:80/americascountryhigh"
# media_content_type: audio/mp4
#
# #-----Turn off the Music--------------------------------------
# - alias: 'Turn off the Radio'
#
# trigger:
# - platform: state
# entity_id:
# - input_boolean.house_station
# to: 'off'
# from: 'on'
#
# action:
# - service: media_player.turn_off
# entity_id: media_player.livingroomCC
#
# - service: input_boolean.turn_off
# entity_id: input_boolean.house_station

126
packages/skybellhd.yaml Executable file
View File

@@ -0,0 +1,126 @@
#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
###################################
## [SkyBell HD](http://amzn.to/2dcexIB)
###################################
homeassistant:
customize_glob:
"sensor.skybell_*":
icon: mdi:camera-front
emulated_hue_hidden: True
hidden: False
homebridge_hidden: True
group:
skybell:
name: Skybell HD Front Door
control: hidden
entities:
- binary_sensor.skybell_stone_door_button
- binary_sensor.skybell_stone_door_motion
- camera.stone_door
- sensor.skybell_stone_door_chime_level
- sensor.skybell_stone_door_motion_sensor
- switch.skybell_stone_door_do_not_disturb
- switch.skybell_stone_door_motion_sensor
skybell:
username: !secret skybell_username
password: !secret skybell_password
camera:
- platform: skybell
binary_sensor:
- platform: skybell
monitored_conditions:
- button
- motion
light:
- platform: skybell # Part of the Outdoor Front Lights Group
sensor:
- platform: skybell
monitored_conditions:
- chime_level
- platform: template
sensors:
skybell:
entity_id: binary_sensor.skybell_stone_door_button
value_template: "{{ 'Online' if is_state_attr('binary_sensor.skybell_stone_door_button', 'status', 'up') else 'Offline' }}"
switch:
- platform: skybell
monitored_conditions:
- do_not_disturb
- motion_sensor
###################################
## Automations
###################################
## Doorbell Press
automation:
- alias: 'Log SkyBell Pressed Activity'
hide_entity: True
trigger:
- platform: state
entity_id:
- binary_sensor.skybell_stone_door_button
to: 'on'
- platform: event
event_type: skybell_pressed
action:
# Disable this automation
- service: automation.turn_off
- service: script.skybell_pressed
- delay:
minutes: 1
# enable this automation - This prevents duplicate pushes.
- service: automation.turn_on
- service: script.tweet_engine
data_template:
tweet: >
{{ [
"Oh, that tickled. Someone just pressed the @MySkyBell.",
"Ouch! That hurt. Who touched the SkyBell Doorbell?",
"Someone just poked me in the @MySkybell!",
"I see you! You are at the @MySkyBell and you just pressed it.",
"Someone answer my door. Someone just pressed the doorbell."
] | random + [
" #Security",
" (http://amzn.to/2dcexIB)",
" (http://www.vmwareinfo.com/2017/07/my-smart-home-look-at-parts-that-make.html)",
" #HomeAutomation"
] | random }}
# Motion Sensing
- alias: 'Log SkyBell Motion detection'
hide_entity: True
trigger:
- platform: event
event_type: skybell_motion
action:
- service: script.front_house_motion
# Turn SkyBell Light and Neato Schedule back on if it's turned off. Like any Good Watchdog.
- alias: Automated Mismatch WatchDog!
hide_entity: True
trigger:
- platform: state
entity_id:
- light.stone_door
- switch.carloneato_schedule
to: 'off'
#Turn it back on!
action:
- service: homeassistant.turn_on
data_template:
entity_id: "{{ trigger.entity_id }}"

54
packages/sleepiq.yaml Executable file
View File

@@ -0,0 +1,54 @@
#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
#-------------------------------------------
homeassistant:
customize_glob:
"sensor.*_sleep_hours":
unit_of_measurement: hours
icon: mdi:sleep
emulated_hue_hidden: True
hidden: False
# customize:
# sensor.Carlo_sleep_hours:
# friendly_name: 'Carlo Slept last night'
# sensor.Stacey_sleep_hours:
# friendly_name: 'Stacey Slept last night'
#-------------------------------------------
sleepiq:
username: !secret sleepiq_username
password: !secret sleepiq_password
#-------------------------------------------
# sensor:
# - platform: history_stats
# name: Carlo_sleep_hours
# entity_id: binary_sensor.sleepnumber_carlo_carlo_is_in_bed
# state: 'on'
# type: time
# end: '{{ now() }}'
# duration:
# hours: 24
#
# - platform: history_stats
# name: Stacey_sleep_hours
# entity_id: binary_sensor.sleepnumber_carlo_stacey_is_in_bed
# state: 'on'
# type: time
# end: '{{ now() }}'
# duration:
# hours: 24
group:
bed:
entities:
- binary_sensor.sleepnumber_carlo_carlo_is_in_bed
- sensor.sleepnumber_carlo_carlo_sleepnumber
# - sensor.Carlo_sleep_hours
- binary_sensor.sleepnumber_carlo_stacey_is_in_bed
- sensor.sleepnumber_carlo_stacey_sleepnumber
# - sensor.Stacey_sleep_hours
##############################################################################
### Automations - Detect when things are not right. Like any Good Watchdog.
##############################################################################

115
packages/space.yaml Executable file
View File

@@ -0,0 +1,115 @@
#-------------------------------------------
# Space Related Packages
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
#-------------------------------------------
#------ISS----------------------------------
homeassistant:
customize:
binary_sensor.iss:
icon: mdi:satellite-variant
friendly_name: ISS Visibility
emulated_hue_hidden: True
hidden: False
homebridge_hidden: true
sensor.launch_window:
hidden: False
icon: mdi:rocket
friendly_name: Rocket Launch Window
#-------------------------------------------
binary_sensor:
- platform: iss
show_on_map: False
#-------------------------------------------
sensor:
- platform: rest
scan_interval: 3600
resource: https://launchlibrary.net/1.2.2/launch/next/10
# resource: https://raw.githubusercontent.com/cribbstechnologies/ha_config/master/www/test_launch.json
name: launch window
# if the current timestamp is in the launch window
# this sensor will return the UTC timestamp of the launch
value_template: >-
{%- for launch in value_json.launches %}
{% if launch.location.id == 16 or launch.location.id == 17 %}
{% if strptime(launch.isostart, '%Y%m%dT%H%M%SZ').strftime('%Y-%m-%d') == now().strftime('%Y-%m-%d') %}
{% set utc_offset_string = now().strftime('%z') %}
{% set utc_offset_direction = utc_offset_string[:1] %}
{% set utc_offset_hours = now().strftime('%z')[-4:] %}
{% set utc_offset_seconds = (utc_offset_hours| int /100) * 60 * 60 %}
{% if utc_offset_direction == '-' %}
{{ launch.wsstamp - utc_offset_seconds}}
{% else %}
{{ launch.wsstamp + utc_offset_seconds}}
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
automation:
- alias: Launch Window Approaching
trigger:
- platform: state
entity_id: sensor.launch_window
condition:
condition: and
conditions:
- condition: template
value_template: "{{states('sensor.launch_window') != 'unknown'}}"
- condition: template
value_template: "{{as_timestamp(now()) < (states('sensor.launch_window') | float)}}"
action:
- service: script.notify_engine
data_template:
value1: 'There will be a rocket Launch today - I will notify you later when the launch window starts'
- wait_template: >-
{{as_timestamp(now()) >= (states('sensor.launch_window') | float)}}
- service: script.notify_engine
data_template:
value1: 'Go Outside! There is a Rocket Launch!'
- service: script.tweet_engine
data_template:
tweet: 'There is a Rocket launch happening right now! I can see it if I look closely. @BrianCribbs #SpaceX #Space'
# This automation was also moved to a macro in the speech_engine.
# It's a random fact now.
- alias: 'ISS is above Me -Tweet'
trigger:
- platform: state
entity_id:
- binary_sensor.iss
to: 'on'
from: 'off'
action:
- service: script.tweet_engine
data_template:
tweet: >
{{ [
"The ISS is above me right now!",
"The International Space Station flys by once a day & that time is NOW! (For me)",
"I can look up RIGHT NOW and see the ISS.",
"The International Space Station Rocks! And it's above me RIGHT NOW!"
] | random + " #Space"}}
- alias: 'Full Moon -Tweet'
trigger:
- platform: state
entity_id: sensor.moon
to: 'Full Moon'
action:
- delay: '{{ (range(1, 6)|random|int) }}:{{ (range(1, 50)|random|int) }}:00'
- service: script.tweet_engine
data_template:
tweet: >
{{ [
"There is a Full Moon out tonight!",
"Wish my solar panels picked up Moon rays. Full Moon out tonight.",
"Turn down the lights, there is a Full Moon out tonight.",
"Get out your telescopes, it'll be a Full Moon out tonight!"
] | random + "#Space"}}

60
packages/time_date_sensors.yaml Executable file
View File

@@ -0,0 +1,60 @@
#-------------------------------------------
# Clean data for the Floorplan UI.
#-------------------------------------------
homeassistant:
customize_glob:
"sensor.floorplan_*":
emulated_hue_hidden: True
hidden: True
homebridge_hidden: True
"sensor.clock_*":
emulated_hue_hidden: True
hidden: True
homebridge_hidden: True
#---Sensor for Time and Date.-----------------------------
sensor:
- platform: template
scan_interval: 30000
sensors:
floorplan_date:
friendly_name: 'Date'
value_template: >-
{{now().strftime("%A")}}, {{now().strftime("%B")}} {{now().strftime("%d")}}
- platform: template
sensors:
floorplan_time:
friendly_name: 'Time'
value_template: >-
{{now().strftime("%-I")}}:{{now().strftime("%M")}} {{now().strftime("%p")}}
- platform: template
sensors:
clock_time:
friendly_name: 'Clock Time'
value_template: >-
{{now().strftime("%-I")}}:{{now().strftime("%M")}}
- platform: template
scan_interval: 30000
sensors:
clock_am_pm:
friendly_name: 'AM/PM'
value_template: >-
{{now().strftime("%p")}}
- platform: template
scan_interval: 30000
sensors:
clock_day:
friendly_name: 'Day'
value_template: >-
{{now().strftime("%A")}}
- platform: template
scan_interval: 30000
sensors:
clock_date:
friendly_name: 'Clock Date'
value_template: >-
{{now().strftime("%B")}} {{now().strftime("%d")}} {{now().year}}

View File

@@ -0,0 +1,49 @@
#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
#-------------------------------------------
homeassistant:
customize:
input_boolean.lastmsg:
friendly_name: 'Repeat Message'
icon: mdi:repeat-once
emulated_hue_hidden: False
hidden: False
#-------------------------------------------
input_boolean:
lastmsg:
name: Last Message
initial: off
#-------------------------------------------
sensor:
- platform: mqtt
state_topic: "polly/lastmsg"
name: "Last Message"
##############################################################################
### Automations -
##############################################################################
automation:
- alias: 'Repeat Last Message'
trigger:
- platform: state
entity_id: input_boolean.lastmsg
to: 'on'
action:
- service: tts.amazon_polly_say
entity_id:
- media_player.livingroomCC
- media_player.entry_alarm_panel
- media_player.bedroom_alarm_panel
data_template:
message: >
<speak>
{{states.sensor.last_message.state}}
</speak>
cache: true
- service: input_boolean.turn_off
entity_id:
- input_boolean.lastmsg

View File

@@ -0,0 +1,23 @@
#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# More information : https://github.com/SmilyOrg/screenmqtt
#-------------------------------------------
homeassistant:
customize:
switch.computer_screens:
friendly_name: 'Computer Screens'
icon: mdi:monitor-multiple
emulated_hue_hidden: False
hidden: False
homebridge_hidden: False
#-------------------------------------------
switch:
- platform: mqtt
name: computer_screens
state_topic: 'carlo-ultra/monitor/all/power/state'
command_topic: 'carlo-ultra/monitor/all/power/command'
#-------------------------------------------
#group - Added to group.interior_switches

View File

@@ -0,0 +1,66 @@
#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
#-------------------------------------------
homeassistant:
customize:
input_boolean.self_destruct:
friendly_name: 'Self Destruct'
icon: mdi:skull
emulated_hue_hidden: False
hidden: False
#-------------------------------------------
input_boolean:
self_destruct:
name: Self Destruct
initial: off
#-------------------------------------------
##############################################################################
### Pretend to blow up the house..
##############################################################################
automation:
- alias: 'Self Destruct sequence'
trigger:
- platform: state
entity_id: input_boolean.self_destruct
to: 'on'
action:
- service: media_player.turn_on
entity_id: media_player.livingroomCC
- service: switch.turn_on
entity_id: switch.living_room_amp
- delay: '00:00:05'
- service: media_player.volume_set
entity_id:
- media_player.livingroomCC
data:
volume_level: 0.22
- service: media_player.play_media
entity_id:
- media_player.livingroomCC
- media_player.entry_alarm_panel
- media_player.bedroom_alarm_panel
data_template:
media_content_id: >
"https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/sounds/speechcons/self_destruct.mp3"
media_content_type: audio/mp4
- service: light.turn_on
entity_id:
- group.all_lights
data:
flash: long
- service: switch.turn_off
entity_id:
- group.all_switches
- service: light.turn_off
entity_id:
- group.all_lights
- service: input_boolean.turn_off
entity_id:
- input_boolean.self_destruct

View File

@@ -0,0 +1,49 @@
#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
#-------------------------------------------
homeassistant:
customize:
input_boolean.sleepy_dog:
friendly_name: 'Sleepy Dog'
icon: mdi:bell-sleep
emulated_hue_hidden: False
hidden: False
#-------------------------------------------
input_boolean:
sleepy_dog:
name: Sleep Dog
initial: off
#-------------------------------------------
##############################################################################
### Automations - Detect when things are not right. Like any Good Watchdog.
##############################################################################
automation:
- alias: 'Snooze the Dog for 30 minutes'
trigger:
- platform: state
entity_id: input_boolean.sleepy_dog
to: 'on'
action:
# Disable automation for 30 minutes
- service: automation.turn_off
entity_id: automation.guard_dog
- service: input_boolean.turn_off
entity_id: input_boolean.sleepy_dog
- service: script.speech_engine
data_template:
call_no_announcement: 1
value1: >
{{ [
"The dogs have been put away for the next 30 minutes.",
"I will let sleeping dogs lie for the next 30 minutes.",
"You will not be bothered by the sound of dogs barking for at least 30 minutes.",
"Sleepy Dog activated. Molly is our only watch cat for the next 30 minutes."
] |random }}
- delay:
minutes: 30
- service: automation.turn_on
entity_id: automation.guard_dog

144
packages/twitter.yaml Executable file
View File

@@ -0,0 +1,144 @@
#-------------------------------------------
# This is the configuration account for @BearStoneHA - My Home's automated twitter account.
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
#-------------------------------------------
# homeassistant:
# customize_glob:
# "input_select.log_*":
# icon: mdi:bug
# emulated_hue_hidden: True
# hidden: False
#Random number - https://www.random.org/integers/?num=1&min=1&max=10&col=1&base=10&format=plain&rnd=new
notify:
- name: BearStoneHA
platform: twitter
consumer_key: !secret twitter_consumer_key
consumer_secret: !secret twitter_consumer_secret
access_token: !secret twitter_access_token
access_token_secret: !secret twitter_access_token_secret
### Building out some Historical stats for tweeting. #####################
sensor:
- platform: history_stats
name: Doorbell Presses
entity_id: binary_sensor.skybell_stone_door_button
state: 'on'
type: count
end: '{{ now() }}'
duration:
hours: 24
- platform: history_stats
name: Landscaping Light time
entity_id: group.landscaping
state: 'on'
type: time
end: '{{ now() }}'
duration:
hours: 24
#############################################################
automation:
- alias: 'New Twitter follower!'
hide_entity: True
trigger:
- platform: event
event_type: new_follower
condition:
- condition: state
entity_id: group.bed
state: 'off'
action:
- service: media_player.play_media
data_template:
entity_id:
- media_player.livingroomCC
- media_player.bedroom_alarm_panel
media_content_id: "https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/sounds/twitter-chirp.mp3"
media_content_type: audio/mp4
- service: script.tweet_engine
data_template:
tweet: >-
{% set handle = trigger.event.data.value1 %}
{% set location = trigger.event.data.location %}
{% set phrases = [
"Thanks for the Follow " ~ handle ~ "! Chirp the Bird from " ~ location ~ "!!",
"Hey " ~ handle ~ "Thanks for the Follow from " ~ location ~ " !",
"New follower " ~ handle ~ " from " ~ location ~ ", I just sounded a chirp in the house.",
"Boom! The " ~ location ~ " follow from " ~ handle ~ " makes me sound a chirp in the house.",
"Wanna know who is super cool? "~ handle ~" IS!!! Thanks for making me CHIRP!",
"If the AMP (http://amzn.to/2j18dlT) is on & I get a new follower like " ~ handle ~ ", I sound a chirp!"
] %}
{% set hashtags = [
"#ThanksForTheFollow",
"#FollowBack",
"#ChirpTheHouse",
"#FollowMe",
"#MakingitChirp",
"(http://www.vmwareinfo.com/2017/11/building-digital-cuckoo-clock-with-home.html)"
] %}
{{ phrases|random ~ " " ~ hashtags|random }}
- alias: 'Closed Github Issue'
hide_entity: True
trigger:
- platform: event
event_type: closed_github
action:
- service: script.tweet_engine
data_template:
tweet: >-
{% set repo = trigger.event.data.repo %}
{% set issue = trigger.event.data.issue %}
{% set issueurl = trigger.event.data.issueurl %}
{% set phrases = [
"New Code Alert: " ~ issue ~ "(" ~ issueurl ~ "). Repo: (https://github.com/CCOSTAN/Home-AssistantConfig/commits/master) "
] %}
{% set hashtags = [
"#Github",
"#HomeAutomation",
"#SmartHomeCode"
] %}
{{ phrases|random ~ " " ~ hashtags|random }}
- alias: 'Random House stats'
hide_entity: True
trigger:
- platform: time
hours: '/4'
minutes: 01
seconds: 00
action:
- service: automation.turn_off
- delay: '0{{ range(0,2) | random | int }}:{{ range(10,59) | random | int }}:00'
- service: script.tweet_engine
data_template:
tweet: >
{{ [
"The number of Doorbell presses today was {{states.sensor.doorbell_presses.state}}",
"The #Landscaping lights where on for about {{states.sensor.landscaping_lights_time.state}} yesterday.",
"So far, I have prevented {{states.sensor.pihole_ads_blocked_today.state}} ads from hitting the network via Pi-hole! http://www.pi-hole.net",
"{{states.sensor.doorbell_presses.state}} people came to the door today and pressed the bell.",
"The Pi has been running for {{states.sensor.since_last_boot_templated.state}}",
"I am running Home Assistant version {{states.sensor.ha_installed_version.state}} (https://github.com/CCOSTAN/Home-AssistantConfig)",
"{{states.sensor.doorbell_presses.state}} doorbell presses occurred in the last 24 hours.",
"I keep the average humidity of the house at {{states.sensor.downstairs_thermostat_humidity.state}} percent. Outside is {{states.sensor.dark_sky_humidity.state}} #Nest (http://amzn.to/2BWNk5N)",
"Outside is {{states.sensor.dark_sky_temperature.state}}. I keep the average temperature at {{states.sensor.downstairs_thermostat_temperature.state}}. #Nest (http://amzn.to/2BWNk5N)",
"Average internet stats are Download: {{states.sensor.speedtest_download.state}} Mbit/s & Upload {{states.sensor.speedtest_upload.state}} Mbit/s.",
"Todays Sleep Number is {{states.sensor.sleepnumber_carlo_stacey_sleepnumber.state}}. Wifi connected Bed! #SleepStat (http://amzn.to/2D10BcQ)",
"Our Sleep Number is {{states.sensor.sleepnumber_carlo_carlo_sleepnumber.state}}. Wifi connected Bed! #SleepStat (http://amzn.to/2D10BcQ)",
"The current UV index is {{states.sensor.dark_sky_uv_index.state}} and the Moon is {{states.sensor.moon.state}}. #Space",
"Home Assistant has been running for {{states.sensor.ha_uptime.state}} minutes. (https://github.com/CCOSTAN/Home-AssistantConfig)",
"My @getspectrum internet download speed is about {{states.sensor.speedtest_download.state}} Mbit/s and I am a #cordcutter. @ "
] | random + " #RandomStat"}}
- service: automation.turn_on

20
packages/usps.yaml.disabled Executable file
View File

@@ -0,0 +1,20 @@
#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
#---Sensor Mail and Packages-----------------------------
usps:
username: !secret myusps_username
password: !secret myusps_password
camera:
- platform: usps
scan_interval: 5
group:
mail:
name: Mailbox Information
control: hidden
entities:
- sensor.usps_mail
- sensor.usps_packages
- camera.usps_mail

View File

@@ -0,0 +1,11 @@
#-------------------------------------------
# Camera Related Packages
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
#---Sensor for Light-----------------------------
camera:
- platform: generic
still_image_url: 'https://icons.wxug.com/data/weather-maps/radar/united-states/saint-petersburg-florida-region-current-radar.gif'
# still_image_url: 'https://radblast.wunderground.com/cgi-bin/radar/WUNIDS_map?station=MCO&brand=wui&num=1&delay=15&type=TR0&frame=0&scale=1.000&noclutter=0&showstorms=0&mapx=400&mapy=240&centerx=400&centery=240&transx=0&transy=0&showlabels=1&severe=0&rainsnow=0&lightning=0&smooth=0&rand=25183060&lat=0&lon=0&label=you'
name: WU Doppler Weather