mirror of
https://github.com/thejeffreystone/home-assistant-configuration.git
synced 2025-08-15 02:34:43 +00:00
This is the current config. Moved old to the v1-config branch
This commit is contained in:
32
sensors/batteries.yaml
Normal file
32
sensors/batteries.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
- 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: "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 %}'
|
@@ -2,15 +2,11 @@
|
||||
sensors:
|
||||
amazon_dot_lr:
|
||||
friendly_name: 'Amazon Dot LR'
|
||||
value_template: "{{ 'Online' if is_state('device_tracker.kindlecdf98981f', 'home') else 'Offline' }}"
|
||||
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.kindle23d7b37a0', 'home') else 'Offline' }}"
|
||||
|
||||
circle:
|
||||
friendly_name: 'Disney Circle'
|
||||
value_template: "{{ 'Online' if is_state('device_tracker.circle', 'home') else 'Offline' }}"
|
||||
value_template: "{{ 'Online' if is_state('device_tracker.dot_kitchen', 'home') else 'Offline' }}"
|
||||
|
||||
tycho:
|
||||
friendly_name: 'tycho'
|
||||
@@ -28,9 +24,9 @@
|
||||
friendly_name: 'xboxone'
|
||||
value_template: "{{ 'Online' if is_state('device_tracker.xboxone', 'home') else 'Offline' }}"
|
||||
|
||||
chromecast:
|
||||
friendly_name: 'Chromecast'
|
||||
value_template: "{{ 'On' if is_state('media_player.chromecast_lr', 'on') else 'Off' }}"
|
||||
chromecast_livingroom:
|
||||
friendly_name: 'Chromecast - Living Room'
|
||||
value_template: "{{ 'On' if is_state('media_player.chromecast_livingroom', 'on') else 'Off' }}"
|
||||
|
||||
smartthings:
|
||||
friendly_name: 'SmartThings'
|
||||
@@ -44,10 +40,6 @@
|
||||
friendly_name: 'Honeywell'
|
||||
value_template: "{{ 'Online' if is_state('device_tracker.gateway2f3bca', 'home') else 'Offline' }}"
|
||||
|
||||
router:
|
||||
friendly_name: 'Asus Router'
|
||||
value_template: "{{ 'Online' if is_state('device_tracker.routerasuscom', 'home') else 'Offline' }}"
|
||||
|
||||
kat_mini:
|
||||
friendly_name: "Kat's Mini"
|
||||
value_template: "{{ 'Online' if is_state('device_tracker.katherinesmini', 'home') else 'Offline' }}"
|
||||
@@ -68,22 +60,36 @@
|
||||
friendly_name: "Kat's iPad"
|
||||
value_template: "{{ 'Online' if is_state('device_tracker.katherinesipad', 'home') else 'Offline' }}"
|
||||
|
||||
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 %}'
|
||||
eero_livingroom:
|
||||
friendly_name: "Eero Living Room"
|
||||
value_template: "{{ 'Online' if is_state('device_tracker.eero_livingroom', 'home') else 'Offline' }}"
|
||||
|
||||
kat_iphone_batt:
|
||||
unit_of_measurement: '%'
|
||||
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' }}"
|
||||
|
||||
washer_status:
|
||||
friendly_name: "Washer Status"
|
||||
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 %}'
|
||||
{% if states('sensor.washer_power') | float > 2 %}
|
||||
running
|
||||
{% else %}
|
||||
idle
|
||||
{%endif %}
|
||||
icon_template: mdi:washing-machine
|
||||
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
- platform: google_travel_time
|
||||
name: "Jeff ETT Home"
|
||||
api_key: !secret google_api
|
||||
origin: device_tracker.jeffreystonesiphone
|
||||
origin: device_tracker.owntracks_jeffreystonesiphone
|
||||
destination: zone.home
|
||||
- platform: google_travel_time
|
||||
name: "Kat ETT Home"
|
||||
|
25
sensors/house.yaml
Normal file
25
sensors/house.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
- platform: mqtt
|
||||
name: "Family Status"
|
||||
state_topic: "house/family/status"
|
||||
payload_on: "home"
|
||||
payload_off: "away"
|
||||
retain: true
|
||||
- platform: template
|
||||
sensors:
|
||||
house_status:
|
||||
friendly_name: Status
|
||||
unit_of_measurement: ''
|
||||
value_template: >-
|
||||
{%- if is_state("sensor.family_status", "home") %}
|
||||
Home ({{ states.sensor.security_status.state }})
|
||||
{% else %}
|
||||
Away ({{ states.sensor.security_status.state }})
|
||||
{%- endif %}
|
||||
icon_template: >-
|
||||
{%- if is_state("sensor.family_status", "home") %}
|
||||
mdi:home
|
||||
{%- elif is_state("sensor.family_status", "away") %}
|
||||
mdi:home-outline
|
||||
{% else %}
|
||||
mdi:home-outline
|
||||
{%- endif %}
|
@@ -1,12 +1,13 @@
|
||||
- platform: mqtt
|
||||
name: "Jeff Phone Battery"
|
||||
state_topic: "owntracks/owntracks/jeffreysphone"
|
||||
state_topic: "owntracks/owntracks/jeffreystonesiphone"
|
||||
qos: 0
|
||||
unit_of_measurement: "%"
|
||||
value_template: '{{ value_json.batt }}'
|
||||
- platform: mqtt
|
||||
name: "Jeff Velocity"
|
||||
state_topic: "owntracks/owntracks/jeffreysphone"
|
||||
state_topic: "owntracks/owntracks/jeffreystonesiphone"
|
||||
qos: 0
|
||||
unit_of_measurement: "mph"
|
||||
unit_of_measurement: "kmh"
|
||||
value_template: '{{ value_json.vel }} '
|
||||
|
||||
|
4
sensors/power.yaml
Normal file
4
sensors/power.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
- platform: mqtt
|
||||
name: "Washer Power"
|
||||
state_topic: "smartthings/Washer/power"
|
||||
retain: true
|
12
sensors/presence.yaml
Normal file
12
sensors/presence.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
- 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
|
9
sensors/security.yaml
Normal file
9
sensors/security.yaml
Normal 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
|
57
sensors/system.yaml
Normal file
57
sensors/system.yaml
Normal 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 ' '"
|
45
sensors/users.yaml
Normal file
45
sensors/users.yaml
Normal file
@@ -0,0 +1,45 @@
|
||||
- platform: mqtt
|
||||
name: "Jeff Destination"
|
||||
state_topic: "jeff/driving/destination"
|
||||
- platform: mqtt
|
||||
name: "Jeff Status"
|
||||
state_topic: "jeff/location/status"
|
||||
- platform: template
|
||||
sensors:
|
||||
jeff_lstatus:
|
||||
friendly_name: Jeff is
|
||||
unit_of_measurement: ''
|
||||
value_template: >-
|
||||
{%- if is_state("sensor.jeff_status", "moving") %}
|
||||
moving
|
||||
{% else %}
|
||||
stationary
|
||||
{%- endif %}
|
||||
icon_template: >-
|
||||
{%- if is_state("sensor.jeff_status", "moving") %}
|
||||
mdi:bike
|
||||
{% else %}
|
||||
mdi:map-marker
|
||||
{%- endif %}
|
||||
- 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 %}
|
||||
|
@@ -34,3 +34,92 @@
|
||||
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 is_state("sensor.pws_alerts.attributes.Description", "Tornado Warning") %}
|
||||
active
|
||||
{% elif is_state("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 is_state("sensor.pws_alerts.attributes.Description", "Tornado Watch") %}
|
||||
active
|
||||
{% elif is_state("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 is_state("sensor.pws_alerts.attributes.Description", "Severe Thunderstorm Warning") %}
|
||||
active
|
||||
{% elif is_state("sensor.pws_alerts.attributes.Description_WRN", "Severe Thunderstorm Warning") %}
|
||||
active
|
||||
{% else %}
|
||||
inactive
|
||||
{%- endif %}
|
||||
icon_template: mdi:message-alert
|
||||
|
||||
storm_statement:
|
||||
friendly_name: 'Storm Statement'
|
||||
value_template: >-
|
||||
{%- if is_state("sensor.pws_alerts.attributes.Description", "Severe Weather Statement") %}
|
||||
active
|
||||
{% elif is_state("sensor.pws_alerts.attributes.Description_SVR", "Severe Weather Statement") %}
|
||||
active
|
||||
{% else %}
|
||||
inactive
|
||||
{%- endif %}
|
||||
icon_template: mdi:message-alert
|
Reference in New Issue
Block a user