This commit is contained in:
Jeffrey Stone
2019-02-21 12:49:55 -05:00
parent 361375cf5c
commit 46a6f6d271
97 changed files with 3443 additions and 1936 deletions

18
sensors/batteries.yaml Executable file → Normal file
View File

@@ -1,21 +1,3 @@
- platform: mqtt
name: "Front Door Battery"
state_topic: "smartthings/Front Door/battery"
- platform: mqtt
name: "Laundry Door Battery"
state_topic: "smartthings/Laundry Room Door/battery"
- platform: mqtt
name: "Kitchen Smoke Battery"
state_topic: "smartthings/Kitchen Smoke/battery"
- platform: mqtt
name: "Attic Door Battery"
state_topic: "smartthings/Attic Door/battery"
- platform: mqtt
name: "Washer Door Battery"
state_topic: "smartthings/Washer Door/battery"
- platform: mqtt
name: "Back Door Battery"
state_topic: "smartthings/Back Door/battery"
- platform: template
sensors:
jeff_iphone_batt:

0
sensors/devices.yaml Executable file → Normal file
View File

14
sensors/finance.yaml Normal file
View File

@@ -0,0 +1,14 @@
- platform: alpha_vantage
api_key: !secret alpha_vantage
symbols:
- symbol: SIRI
name: Sirius
- symbol: BAC
name: BoA
- symbol: INTC
name: Intel
- symbol: DIS
name: Disney
- symbol: BKS
name: Barnes & Noble

0
sensors/google_travel_time.yaml Executable file → Normal file
View File

View File

@@ -1,4 +0,0 @@
- platform: mqtt
name: "Master Bedroom Fan"
state_topic: "smartthings/Master Bedroom Fan/power"
retain: true

View File

@@ -1,19 +0,0 @@
- platform: mqtt
name: "Kat Presence"
state_topic: "smartthings/Kat/presence"
payload_on: "present"
payload_off: "not present"
retain: true
- platform: mqtt
name: "Jeff Presence"
state_topic: "smartthings/Jeffrey/presence"
payload_on: "present"
payload_off: "not present"
retain: true
- platform: mqtt
name: "Family Status"
state_topic: "house/family/status"
payload_on: "Home"
payload_off: "Away"
retain: true

9
sensors/security.yaml Executable file → Normal file
View File

@@ -1,9 +1,6 @@
- platform: mqtt
name: "Lockdown Status"
state_topic: "house/lockdown/status"
- platform: mqtt
name: "Kitchen Smoke"
state_topic: "smartthings/Kitchen Smoke/smoke"
payload_on: "smoke"
payload_off: "clear"
retain: true
payload_available: "smoke"
payload_not_available: "clear"

28
sensors/speedtest.yaml Executable file → Normal file
View File

@@ -1,11 +1,17 @@
- platform: speedtest
minute: 30
hour:
- 0
- 6
- 12
- 18
monitored_conditions:
- ping
- download
- upload
# - platform: speedtest
# minute: 30
# hour:
# - 0
# - 6
# - 12
# - 18
# monitored_conditions:
# - ping
# - download
# - upload
- platform: mqtt
name: "network down"
state_topic: "house/speedtest/down"
- platform: mqtt
name: "network up"
state_topic: "house/speedtest/up"

View File

@@ -1,57 +0,0 @@
- platform: systemmonitor
resources:
- type: disk_use_percent
arg: /
- type: memory_use_percent
- type: network_in
arg: eth0
- type: network_out
arg: eth0
- type: last_boot
- type: load_15m
- type: processor_use
- type: since_last_boot
- platform: cpuspeed
name: CPU
- platform: time_date
display_options:
- 'time'
- 'date'
- 'date_time'
- 'time_date'
- 'time_utc'
- 'beat'
- platform: cert_expiry
host: !secret BASEURL
name: Lets Encrypt Expiration
- platform: command_line
name: "HA Uptime"
command: echo "$(($(date +%s) - $(date -d "$(head -n1 /home/homeassistant/.homeassistant/home-assistant.log | cut -d' ' -f-2)" +%s)))"
scan_interval: 720
value_template: >-
{% set uptime = value | int %}
{% set seconds = uptime % 60 %}
{% set minutes = ((uptime % 3600) / 60) | int %}
{% set hours = ((uptime % 86400) / 3600) | int %}
{% set days = (uptime / 86400) | int %}
{%- if days > 0 -%}
{%- if days == 1 -%}
1 day
{%- else -%}
{{ days }} days
{%- endif -%}
{{ ', ' }}
{%- endif -%}
{{ '%02d' % hours }}:{{ '%02d' % minutes }}
- platform: command_line
command: python3 -c "import requests; print(requests.get('https://pypi.python.org/pypi/homeassistant/json').json()['info']['version'])"
name: Current HA Version
- platform: command_line
name: Installed version
command: "head -5 /home/homeassistant/.homeassistant/.HA_VERSION"
- platform: command_line
name: ha_v2db
command: "ls -sh /home/homeassistant/.homeassistant/home-assistant_v2.db | cut -f1 -d ' '"
- platform: command_line
name: ha_log
command: "ls -sh /home/homeassistant/.homeassistant/home-assistant.log | cut -f1 -d ' '"

21
sensors/users.yaml Executable file → Normal file
View File

@@ -4,24 +4,3 @@
- platform: mqtt
name: "Kat Destination"
state_topic: "kat/driving/destination"
- platform: template
sensors:
family_presence:
friendly_name: Family Presence
unit_of_measurement: ''
value_template: >-
{%- if is_state("sensor.jeff_presence", "present") %}
Home
{% elif is_state("sensor.kat_presence", "present") %}
Home
{% else %}
Away
{%- endif %}
icon_template: >-
{%- if is_state("sensor.family_presence", "Home") %}
mdi:home
{%- elif is_state("sensor.family_presence", "Away") %}
mdi:home-outline
{% else %}
mdi:sync-alert
{%- endif %}

175
sensors/weather.yaml Executable file → Normal file
View File

@@ -1,5 +1,7 @@
- platform: darksky
api_key: !secret FORCAST_API_KEY
forecast:
- 0
monitored_conditions:
- summary
- icon
@@ -9,6 +11,8 @@
- precip_intensity
- precip_probability
- temperature
- temperature_high
- temperature_low
- apparent_temperature
- dew_point
- wind_speed
@@ -30,15 +34,11 @@
seconds: 0
milliseconds: 0
- platform: moon
# - platform: pollen
# zip_code: "30017"
# monitored_conditions:
# - allergy_average_forecasted
# - allergy_average_historical
# - allergy_index_today
# - allergy_index_tomorrow
# - allergy_index_yesterday
# - disease_average_forecasted
- platform: pollen
zip_code: "30017"
monitored_conditions:
- allergy_index_today
- asthma_index_today
## Accurite 158 - Back Porch
- platform: mqtt
name: "Accurite Back Porch Temperature"
@@ -70,64 +70,105 @@
- platform: mqtt
name: "Accurite Garage lupdate"
state_topic: "house/accurite-10968/lastupdate"
- platform: nws_alerts
zone_id: 'GAZ034'
# - platform: rest
# resource: https://api.weather.gov/alerts/active/count
# name: NWS Alert Count Raw
# value_template: >
# {% if value_json is defined and value_json.zones.GAZ034 is defined %}
# {{ value_json.zones.GAZ034 }}
# {% else %}
# 0
# {% endif %}
# headers:
# User-Agent: Homeassistant
# Accept: application/ld+json
# scan_interval: 60
# - platform: template
# sensors:
# nws_alert_count_filtered:
# friendly_name: NWS Alert Count
# entity_id: sensor.nws_alert_count_raw
# value_template: >
# {% if is_state('sensor.nws_alert_count_raw', 'unavailable') or is_state('sensor.nws_alert_count_raw', 'unknown') %}
# {{ states.sensor.nws_alert_count_filtered.state }}
# {% else %}
# {{ states.sensor.nws_alert_count_raw.state }}
# {% endif %}
# - platform: rest
# resource: https://api.weather.gov/alerts/active?zone=GAZ034
# name: NWS Alert Event Raw
# value_template: >
# {% if value_json.features[0] is defined %}
# {{ value_json['features'][0]['properties'].event }}
# {% else %}
# None
# {% endif %}
# json_attributes:
# - features
# headers:
# User-Agent: Homeassistant
# Accept: application/geo+json
# scan_interval: 60
# - platform: template
# sensors:
# nws_alert_event_filtered:
# friendly_name: NWS Alert Event
# entity_id: sensor.nws_alert_event_raw
# value_template: >
# {% if is_state('sensor.nws_alert_event_raw', 'unavailable') or is_state('sensor.nws_alert_event_raw', 'unknown') %}
# {{ states.sensor.nws_alert_event_filtered.state }}
# {% else %}
# {{ states.sensor.nws_alert_event_raw.state }}
# {% endif %}
# - platform: template
# sensors:
# nws_alert_event_2:
# friendly_name: NWS Alert Event 2
# entity_id: sensor.nws_alert_event_raw
# value_template: >
# {% if state_attr('sensor.nws_alert_event_raw', 'features')[1] is defined %}
# {{ state_attr('sensor.nws_alert_event_raw', 'features')[1]['properties'].event }}
# {% else %}
# None
# {% endif %}
# nws_alert_event_3:
# friendly_name: NWS Alert Event 3
# entity_id: sensor.nws_alert_event_raw
# value_template: >
# {% if state_attr('sensor.nws_alert_event_raw', 'features')[2] is defined %}
# {{ state_attr('sensor.nws_alert_event_raw', 'features')[2]['properties'].event }}
# {% else %}
# None
# {% endif %}
- platform: template
sensors:
tornado_warning:
friendly_name: 'Tornado Warning'
value_template: >-
{%- if states.sensor.pws_alerts.attributes.Description == "Tornado Warning" %}
active
{% elif states.sensor.pws_alerts.attributes.Description_TOR == "Tornado Warning" %}
active
clothing_forecast:
friendly_name: "Clothing Forecast"
unit_of_measurement: ''
value_template: >-
{%- if states('sensor.dark_sky_daytime_high_temperature_0')|float > 63 %}
{%- if states('sensor.dark_sky_daytime_high_temperature_0')|float < 80 %}
Nice
{% elif states('sensor.dark_sky_daytime_high_temperature_0')|float > 95 %}
Hot
{% else %}
Toasty
{%- endif %}
{% elif states('sensor.dark_sky_daytime_high_temperature_0')|float < 64 %}
{%- if states('sensor.dark_sky_daytime_high_temperature_0')|float < 32 %}
Freezing
{% elif states('sensor.dark_sky_daytime_high_temperature_0')|float > 50 %}
Chilly
{% else %}
Cold
{%- endif %}
{% else %}
inactive
{%- endif %}
icon_template: mdi:message-alert
tornado_watch:
friendly_name: 'Tornado Watch'
value_template: >-
{%- if states.sensor.pws_alerts.attributes.Description == "Tornado Watch" %}
active
{% elif states.sensor.pws_alerts.attributes.Description_TOW == "Tornado Watch" %}
active
{% else %}
inactive
{%- endif %}
icon_template: mdi:message-alert
tstorm_warning:
friendly_name: 'T-Storm Warning'
value_template: >-
{%- if states.sensor.pws_alerts.attributes.Description == "Severe Thunderstorm Warning" %}
active
{% elif states.sensor.pws_alerts.attributes.Description_WRN == "Severe Thunderstorm Warning" %}
active
{% else %}
inactive
{%- endif %}
icon_template: mdi:message-alert
tstorm_watch:
friendly_name: 'T-Storm Watch'
value_template: >-
{%- if states.sensor.pws_alerts.attributes.Description == "Severe Thunderstorm Watch" %}
active
{% elif states.sensor.pws_alerts.attributes.Description_SEW == "Severe Thunderstorm Watch" %}
active
{% else %}
inactive
{%- endif %}
icon_template: mdi:message-alert
storm_statement:
friendly_name: 'Storm Statement'
value_template: >-
{%- if states.sensor.pws_alerts.attributes.Description == "Severe Weather Statement" %}
active
{% elif states.sensor.pws_alerts.attributes.Description_SVR == "Severe Weather Statement" %}
active
{% else %}
inactive
{%- endif %}
icon_template: mdi:message-alert
Unknown
{%- endif %}

View File

@@ -1,42 +0,0 @@
- platform: wunderground
api_key: !secret WUNDERGROUND_API_KEY
monitored_conditions:
- alerts
- dewpoint_c
- dewpoint_f
- dewpoint_string
- feelslike_c
- feelslike_f
- feelslike_string
- heat_index_c
- heat_index_f
- heat_index_string
- elevation
- location
- observation_time
- precip_1hr_in
- precip_1hr_metric
- precip_1hr_string
- precip_today_in
- precip_today_metric
- precip_today_string
- pressure_in
- pressure_mb
- pressure_trend
- relative_humidity
- station_id
- solarradiation
- temperature_string
- temp_c
- temp_f
- UV
- visibility_km
- visibility_mi
- weather
- wind_degrees
- wind_dir
- wind_gust_kph
- wind_gust_mph
- wind_kph
- wind_mph
- wind_string