mirror of
https://github.com/thejeffreystone/home-assistant-configuration.git
synced 2025-09-13 15:25:46 +00:00
Version 3
This commit is contained in:
38
sensors/batteries.yaml
Executable file
38
sensors/batteries.yaml
Executable file
@@ -0,0 +1,38 @@
|
||||
- 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:
|
||||
unit_of_measurement: '%'
|
||||
value_template: >-
|
||||
{%- if states.device_tracker.jeffreystonesiphone.attributes.battery %}
|
||||
{{ states.device_tracker.jeffreystonesiphone.attributes.battery | round(1) }}
|
||||
{% else %}
|
||||
{{ states.sensor.jeff_iphone_batt.state }}
|
||||
{%- endif %}
|
||||
icon_template: '{%- if is_state("sensor.jeff_iphone_batt", "unknown") %}mdi:battery-unknown{%- elif is_state_attr("device_tracker.jeffreystonesiphone", "battery_status", "Charging") %}mdi:battery-charging{%- elif states.device_tracker.jeffreystonesiphone.attributes.battery <= 5 %}mdi:battery-outline{%- elif states.device_tracker.jeffreystonesiphone.attributes.battery >= 95 %}mdi:battery{% else %}mdi:battery-{{(states.device_tracker.jeffreystonesiphone.attributes.battery|float / 10)|round*10}}{%- endif %}'
|
||||
kat_iphone_batt:
|
||||
unit_of_measurement: '%'
|
||||
value_template: >-
|
||||
{%- if states.device_tracker.katherinestonesiphone.attributes.battery %}
|
||||
{{ states.device_tracker.katherinestonesiphone.attributes.battery | round(1) }}
|
||||
{% else %}
|
||||
{{ states.sensor.kat_iphone_batt.state }}
|
||||
{%- endif %}
|
||||
icon_template: '{%- if is_state("sensor.kat_iphone_batt", "unknown") %}mdi:battery-unknown{%- elif is_state_attr("device_tracker.katherinestonesiphone", "battery_status", "Charging") %}mdi:battery-charging{%- elif states.device_tracker.katherinestonesiphone.attributes.battery <= 5 %}mdi:battery-outline{%- elif states.device_tracker.katherinestonesiphone.attributes.battery >= 95 %}mdi:battery{% else %}mdi:battery-{{(states.device_tracker.katherinestonesiphone.attributes.battery|float / 10)|round*10}}{%- endif %}'
|
72
sensors/devices.yaml
Executable file
72
sensors/devices.yaml
Executable file
@@ -0,0 +1,72 @@
|
||||
- platform: template
|
||||
sensors:
|
||||
amazon_dot_lr:
|
||||
friendly_name: 'Amazon Dot LR'
|
||||
value_template: "{{ 'Online' if is_state('device_tracker.dot_livingroom', 'home') else 'Offline' }}"
|
||||
|
||||
amazon_dot_kn:
|
||||
friendly_name: 'Amazon Dot KN'
|
||||
value_template: "{{ 'Online' if is_state('device_tracker.dot_kitchen', 'home') else 'Offline' }}"
|
||||
|
||||
appletv:
|
||||
friendly_name: 'Apple Tv'
|
||||
value_template: "{{ 'On' if is_state('media_player.apple_tv', 'on') else 'Off' }}"
|
||||
|
||||
xboxone:
|
||||
friendly_name: 'xboxone'
|
||||
value_template: "{{ 'Online' if is_state('device_tracker.xboxone', 'home') else 'Offline' }}"
|
||||
|
||||
chromecast_livingroom:
|
||||
friendly_name: 'Chromecast - Living Room'
|
||||
value_template: "{{ 'On' if is_state('media_player.chromecast_livingroom', 'on') else 'Off' }}"
|
||||
|
||||
smartthings:
|
||||
friendly_name: 'SmartThings'
|
||||
value_template: "{{ 'Online' if is_state('device_tracker.d052a8170fef', 'home') else 'Offline' }}"
|
||||
|
||||
samsungtv:
|
||||
friendly_name: 'Samsung Tv'
|
||||
value_template: "{{ 'On' if is_state('media_player.pn60e550_pn60e550', 'on') else 'Off' }}"
|
||||
|
||||
honeywell:
|
||||
friendly_name: 'Honeywell'
|
||||
value_template: "{{ 'Online' if is_state('device_tracker.gateway2f3bca', 'home') else 'Offline' }}"
|
||||
|
||||
kat_mini:
|
||||
friendly_name: "Kat's Mini"
|
||||
value_template: "{{ 'Online' if is_state('device_tracker.katherinesmini', 'home') else 'Offline' }}"
|
||||
|
||||
jeff_work_mbp:
|
||||
friendly_name: "Jeff's Work MBP"
|
||||
value_template: "{{ 'Online' if is_state('device_tracker.jstonemac', 'home') else 'Offline' }}"
|
||||
|
||||
jeff_ipad:
|
||||
friendly_name: "Jeff's iPad"
|
||||
value_template: "{{ 'Online' if is_state('device_tracker.jeffreystonesipad', 'home') else 'Offline' }}"
|
||||
|
||||
kat_ipad:
|
||||
friendly_name: "Kat's iPad"
|
||||
value_template: "{{ 'Online' if is_state('device_tracker.katherinesipad', 'home') else 'Offline' }}"
|
||||
|
||||
eero_livingroom:
|
||||
friendly_name: "Eero Living Room"
|
||||
value_template: "{{ 'Online' if is_state('device_tracker.eero_livingroom', 'home') else 'Offline' }}"
|
||||
|
||||
eero_loft:
|
||||
friendly_name: "Eero Loft"
|
||||
value_template: "{{ 'Online' if is_state('device_tracker.eero_loft', 'home') else 'Offline' }}"
|
||||
|
||||
smoke_kitchen:
|
||||
friendly_name: "Kitchen Smoke"
|
||||
value_template: "{{ 'Smoke Detected!' if is_state('device_tracker.eero_loft', 'smoke') else 'All Clear' }}"
|
||||
|
||||
security_status:
|
||||
friendly_name: 'Security System'
|
||||
value_template: '{{ "Armed" if is_state("input_boolean.secure_mode", "on") else "Disarmed" }}'
|
||||
icon_template: '{%- if is_state("input_boolean.secure_mode", "on") %}mdi:lock{% else %}mdi:lock-open{%- endif %}'
|
||||
|
||||
garage_motion:
|
||||
friendly_name: "Garage Motion"
|
||||
value_template: "{{ 'open' if is_state('sensor.garage_dome_sensor', 'motion') else 'clear' }}"
|
||||
|
||||
|
24
sensors/google_travel_time.yaml
Executable file
24
sensors/google_travel_time.yaml
Executable file
@@ -0,0 +1,24 @@
|
||||
- platform: waze_travel_time
|
||||
name: "Jeff ETT Home"
|
||||
#api_key: !secret google_api
|
||||
origin: device_tracker.jeffreystonesiphone
|
||||
destination: zone.home
|
||||
region: 'US'
|
||||
- platform: waze_travel_time
|
||||
name: "Kat ETT Home"
|
||||
#api_key: !secret google_api
|
||||
origin: device_tracker.katherinestonesiphone
|
||||
destination: zone.home
|
||||
region: 'US'
|
||||
- platform: waze_travel_time
|
||||
name: "Home To Summit"
|
||||
# api_key: !secret google_api
|
||||
origin: zone.home
|
||||
destination: zone.summit
|
||||
region: 'US'
|
||||
- platform: waze_travel_time
|
||||
name: "Home To Zoo"
|
||||
# api_key: !secret google_api#
|
||||
origin: zone.home
|
||||
destination: zone.zoo_atlanta
|
||||
region: 'US'
|
4
sensors/power.yaml
Executable file
4
sensors/power.yaml
Executable file
@@ -0,0 +1,4 @@
|
||||
- platform: mqtt
|
||||
name: "Master Bedroom Fan"
|
||||
state_topic: "smartthings/Master Bedroom Fan/power"
|
||||
retain: true
|
19
sensors/presence.yaml
Executable file
19
sensors/presence.yaml
Executable file
@@ -0,0 +1,19 @@
|
||||
- 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
9
sensors/security.yaml
Executable file
@@ -0,0 +1,9 @@
|
||||
- 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
|
11
sensors/speedtest.yaml
Executable file
11
sensors/speedtest.yaml
Executable file
@@ -0,0 +1,11 @@
|
||||
- platform: speedtest
|
||||
minute: 30
|
||||
hour:
|
||||
- 0
|
||||
- 6
|
||||
- 12
|
||||
- 18
|
||||
monitored_conditions:
|
||||
- ping
|
||||
- download
|
||||
- upload
|
57
sensors/system.yaml
Executable file
57
sensors/system.yaml
Executable file
@@ -0,0 +1,57 @@
|
||||
- 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 ' '"
|
27
sensors/users.yaml
Executable file
27
sensors/users.yaml
Executable file
@@ -0,0 +1,27 @@
|
||||
- platform: mqtt
|
||||
name: "Jeff Destination"
|
||||
state_topic: "jeff/driving/destination"
|
||||
- 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 %}
|
133
sensors/weather.yaml
Executable file
133
sensors/weather.yaml
Executable file
@@ -0,0 +1,133 @@
|
||||
- platform: darksky
|
||||
api_key: !secret FORCAST_API_KEY
|
||||
monitored_conditions:
|
||||
- summary
|
||||
- icon
|
||||
- nearest_storm_distance
|
||||
- nearest_storm_bearing
|
||||
- precip_type
|
||||
- precip_intensity
|
||||
- precip_probability
|
||||
- temperature
|
||||
- apparent_temperature
|
||||
- dew_point
|
||||
- wind_speed
|
||||
- wind_bearing
|
||||
- cloud_cover
|
||||
- humidity
|
||||
- pressure
|
||||
- visibility
|
||||
- ozone
|
||||
- minutely_summary
|
||||
- hourly_summary
|
||||
- daily_summary
|
||||
- precip_intensity_max
|
||||
update_interval:
|
||||
# At least one of these must be specified:
|
||||
days: 0
|
||||
hours: 0
|
||||
minutes: 5
|
||||
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
|
||||
## Accurite 158 - Back Porch
|
||||
- platform: mqtt
|
||||
name: "Accurite Back Porch Temperature"
|
||||
state_topic: "house/accurite-158/temperature"
|
||||
- platform: mqtt
|
||||
name: "Accurite Back Porch Humidity"
|
||||
state_topic: "house/accurite-158/humidity"
|
||||
# - platform: mqtt
|
||||
# name: "Accurite Back Porch Status"
|
||||
# state_topic: "house/accurite-158/status"
|
||||
# - platform: mqtt
|
||||
# name: "Accurite Back Porch Battery"
|
||||
# state_topic: "house/accurite-158/battery"
|
||||
- platform: mqtt
|
||||
name: "Accurite Back Porch Model"
|
||||
state_topic: "house/accurite-158/model"
|
||||
- platform: mqtt
|
||||
name: "Accurite Back Porch lupdate"
|
||||
state_topic: "house/accurite-158/lastupdate"
|
||||
- platform: mqtt
|
||||
name: "Accurite Garage Temperature"
|
||||
state_topic: "house/accurite-10968/temperature"
|
||||
- platform: mqtt
|
||||
name: "Accurite Garage Humidity"
|
||||
state_topic: "house/accurite-10968/humidity"
|
||||
- platform: mqtt
|
||||
name: "Accurite Garage Model"
|
||||
state_topic: "house/accurite-10968/model"
|
||||
- platform: mqtt
|
||||
name: "Accurite Garage lupdate"
|
||||
state_topic: "house/accurite-10968/lastupdate"
|
||||
- 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
|
||||
{% 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
|
42
sensors/wunderground.yaml
Executable file
42
sensors/wunderground.yaml
Executable file
@@ -0,0 +1,42 @@
|
||||
- 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
|
Reference in New Issue
Block a user