From d4075b3a4bd8736e6c6ccf5b004c96ca24520df2 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Fri, 3 Feb 2017 15:00:25 -0500 Subject: [PATCH] Automation and Sensor Updates Cleaned up Devices Added Sensors for Computers Cleaned up device based automations --- automations/good_night.yaml | 2 +- automations/jeff_home_enter.yaml | 2 +- automations/jeff_home_leave.yaml | 2 +- automations/kat_home_enter.yaml | 2 +- automations/kat_home_leave.yaml | 2 +- groups.yaml | 16 ++++++++-------- sensors/devices.yaml | 26 +++++++++++++++++++++++--- 7 files changed, 36 insertions(+), 16 deletions(-) diff --git a/automations/good_night.yaml b/automations/good_night.yaml index 606f96b..d6930e4 100644 --- a/automations/good_night.yaml +++ b/automations/good_night.yaml @@ -9,4 +9,4 @@ action: entity_id: scene.livingroom_night - service: notify.notify data: - title: "Shutting down for the night, Good Night" + title: "HA: Shutting down for the night, Good Night" diff --git a/automations/jeff_home_enter.yaml b/automations/jeff_home_enter.yaml index e8440f2..e8a349e 100644 --- a/automations/jeff_home_enter.yaml +++ b/automations/jeff_home_enter.yaml @@ -3,7 +3,7 @@ trigger: platform: zone event: enter zone: zone.home - entity_id: device_tracker.owntracks_jeffreysphone + entity_id: device_tracker.jeffreysiphone action: - service: notify.notify data: diff --git a/automations/jeff_home_leave.yaml b/automations/jeff_home_leave.yaml index 988f0df..fa3c52d 100644 --- a/automations/jeff_home_leave.yaml +++ b/automations/jeff_home_leave.yaml @@ -3,7 +3,7 @@ trigger: platform: zone event: leave zone: zone.home - entity_id: device_tracker.owntracks_jeffreysphone + entity_id: device_tracker.jeffreysiphone action: - service: notify.notify data: diff --git a/automations/kat_home_enter.yaml b/automations/kat_home_enter.yaml index f6d682d..0a56c3f 100644 --- a/automations/kat_home_enter.yaml +++ b/automations/kat_home_enter.yaml @@ -3,7 +3,7 @@ trigger: platform: zone event: enter zone: zone.home - entity_id: device_tracker.katheriesiphone_2 + entity_id: device_tracker.katherinesiphone action: - service: notify.notify data: diff --git a/automations/kat_home_leave.yaml b/automations/kat_home_leave.yaml index 49c753c..bdc5e9f 100644 --- a/automations/kat_home_leave.yaml +++ b/automations/kat_home_leave.yaml @@ -3,7 +3,7 @@ trigger: platform: zone event: leave zone: zone.home - entity_id: device_tracker.katheriesiphone_2 + entity_id: device_tracker.katherinesiphone action: - service: notify.notify data: diff --git a/groups.yaml b/groups.yaml index 009c42b..ab2c6c3 100644 --- a/groups.yaml +++ b/groups.yaml @@ -37,17 +37,17 @@ environment: ### Grops ### Family: - - device_tracker.owntracks_jeffreysphone - - device_tracker.katheriesiphone_2 + - device_tracker.jeffreysiphone + - device_tracker.katherinesiphone Jeffrey: - - device_tracker.owntracks_jeffreysphone + - device_tracker.jeffreysiphone - sensor.jeff_iphone_batt - input_select.jeff_status - sensor.jeff_ett_home Katherine: - - device_tracker.katheriesiphone_2 + - device_tracker.katherinesiphone - sensor.kat_iphone_batt - sensor.kat_ett_home @@ -104,10 +104,10 @@ Home Automation: # - device_tracker.ipcam_00626e46eb09_1 Computers: - - device_tracker.jeffreyonesipad - - device_tracker.jeffreysmbp - - device_tracker.jstonemac - - device_tracker.katherinesipad + - sesnor.jeff_ipad + - sensor.jeff_mbp + - sensor.jeff_work_mbp + - sensor.kat_ipad - sensor.kat_mini Servers: diff --git a/sensors/devices.yaml b/sensors/devices.yaml index d89467e..12bb735 100644 --- a/sensors/devices.yaml +++ b/sensors/devices.yaml @@ -4,6 +4,10 @@ friendly_name: 'Amazon Dot LR' value_template: "{{ 'Online' if is_state('device_tracker.kindlecdf98981f', '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' }}" @@ -48,6 +52,22 @@ friendly_name: "Kat's Mini" value_template: "{{ 'Online' if is_state('device_tracker.katherinesmini', 'home') else 'Offline' }}" + jeff_mbp: + friendly_name: "Jeff's MBP" + value_template: "{{ 'Online' if is_state('device_tracker.jeffreysmbp', '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.jeffreysipad', 'home') else 'Offline' }}" + + kat_ipad: + 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: >- @@ -60,8 +80,8 @@ kat_iphone_batt: unit_of_measurement: '%' value_template: >- - {%- if states.device_tracker.katheriesiphone_2.attributes.battery %} - {{ states.device_tracker.katheriesiphone_2.attributes.battery | round(1) }} + {%- if states.device_tracker.katherinesiphone.attributes.battery %} + {{ states.device_tracker.katherinesiphone.attributes.battery | round(1) }} {% else %} {{ states.sensor.kat_iphone_batt.state }} - {%- endif %} \ No newline at end of file + {%- endif %}