Lots and Lots of Cleanup code. Getting the sensors in order.

This commit is contained in:
CCOSTAN
2017-03-13 23:57:22 +00:00
parent f70a671692
commit 2d22ec73ea
8 changed files with 69 additions and 26 deletions

View File

@@ -1,12 +1,13 @@
######################################################################
## Garage Status Announcements
######################################################################
- alias: 'Door Opened/Closed'
- alias: 'Door Opened'
trigger:
- platform: state
entity_id:
- sensor.backdoor
to: 'Opened'
action:
- service: input_boolean.turn_on
@@ -14,4 +15,10 @@
- service: script.Voice_notify
data_template:
value1: "The {{ trigger.entity_id.split('.')[1]|replace('_', ' ') }} is now {{ (trigger.to_state.state)|replace('_', ' ') }}."
value1: "The {{ trigger.entity_id.split('.')[1]|replace('_', ' ') }} has been {{ (trigger.to_state.state)|replace('_', ' ') }}."
- service: script.ifttt_notify
data_template:
value1: "The {{ trigger.entity_id.split('.')[1]|replace('_', ' ') }} has been {{ (trigger.to_state.state)|replace('_', ' ') }}."
value2: ''
value3: ''

View File

@@ -1,13 +1,15 @@
######################################################################
## Garage Status Announcements - Only during normal hours.
######################################################################
- alias: 'Garage closed'
- alias: 'Garage or Door closed'
trigger:
- platform: state
entity_id:
- cover.large_garage
- cover.small_garage
- sensor.backdoor
from: 'open'
to: 'closed'
for: '00:02:00'
@@ -15,4 +17,4 @@
action:
- service: script.Voice_notify
data_template:
value1: "The {{ trigger.entity_id.split('.')[1]|replace('_', ' ')|replace('garadget large', 'large garage ')|replace('garadget small', 'small garage ') }} is now {{ (trigger.to_state.state)|replace('_', ' ') }}."
value1: "The {{ trigger.entity_id.split('.')[1]|replace('_', ' ') }} is now {{ (trigger.to_state.state)|replace('_', ' ') }}."

View File

@@ -38,8 +38,9 @@
- condition: state
entity_id: binary_sensor.sleepnumber_carlo_stacey_is_in_bed
state: 'off'
- condition: state
entity_id: sun.sun
state: 'above_horizon'
action:
- service: light.turn_on
@@ -48,7 +49,6 @@
- light.sink
- service: script.Voice_notify
data_template:
value1: "It is getting a little dark inside the house because of the {{trigger.entity_id.split('_')[2]|replace('precip','rain') }} {{trigger.entity_id.split('_')[3]|replace('intensity',' ')}}
outside. I will turn on some extra lights in the living room."
value1: "It is getting a little dark inside the house because of the {{trigger.entity_id.split('_')[2]|replace('precip','rain') }} {{trigger.entity_id.split('_')[3]|replace('intensity',' ')}} outside. I will turn on some extra lights in the living room."
######################################################################

View File

@@ -1,5 +1,5 @@
###################################
## ZWave Section -
## ZWave Section -
## Home Assistant runs on my [Raspberry Pi 3](http://amzn.to/2e3DOBY) with [Aeon Labs Z Wave Stick (GEN 5)](http://amzn.to/2eAiAP0).
###################################
@@ -15,7 +15,7 @@
- platform: state
entity_id: binary_sensor.aeotec_dsb04100_doorwindow_sensor_sensor_4_0
state: 'on'
condition:
condition: or
conditions:
@@ -25,10 +25,10 @@
- condition: numeric_state
entity_id: sensor.dark_sky_cloud_coverage
above: 50
action:
- service: light.turn_on
entity_id:
entity_id:
- light.kids_hallway
- light.k4
- delay: 00:20:00
@@ -47,7 +47,7 @@
- platform: state
entity_id: binary_sensor.aeotec_dsb04100_doorwindow_sensor_sensor_4_0
state: 'off'
action:
service: light.turn_off
entity_id: light.kids_hallway
@@ -68,12 +68,12 @@
- platform: state
entity_id: binary_sensor.aeotec_dsb04100_doorwindow_sensor_sensor_4_0
state: 'off'
condition:
condition:
condition: state
entity_id: light.k1
state: 'off'
action:
- service: light.turn_off
entity_id: light.k4

View File

@@ -12,18 +12,29 @@ binary_sensor.__sensor_6_0:
hidden: True
binary_sensor.aeotec_dsb04100_doorwindow_sensor_sensor_3_0:
friendly_name: 'Aeotec Dsb04100 Door/window Sensor Sensor 3'
emulated_hue: False
hidden: True
icon: mdi:home-variant
binary_sensor.aeotec_dsb04100_doorwindow_sensor_sensor_4_0:
friendly_name: 'Aeotec Dsb04100 Door/window Sensor Sensor 4'
emulated_hue: False
hidden: True
icon: mdi:home-variant
binary_sensor.aeotec_dsb04100_doorwindow_sensor_sensor_5_0:
friendly_name: 'Aeotec Dsb04100 Door/window Sensor Sensor'
friendly_name: 'Aeotec Dsb04100 Door/window Sensor Sensor 5'
emulated_hue: False
hidden: True
icon: mdi:home-variant
binary_sensor.aeotec_dsb04100_doorwindow_sensor_sensor_6_0:
friendly_name: 'Aeotec Dsb04100 Door/window Sensor Sensor 6'
emulated_hue: False
hidden: True
icon: mdi:home-variant
binary_sensor.downstairs_thermostat_fan:
friendly_name: 'Downstairs Thermostat Fan'

View File

@@ -10,19 +10,32 @@ sensor.backdoor:
hidden: False
icon: mdi:home-variant
sensor.linen_door:
friendly_name: 'Linen Door'
emulated_hue: False
hidden: False
icon: mdi:home-variant
sensor.aeotec_dsb04100_doorwindow_sensor_alarm_level_3_1:
friendly_name: 'Aeotec Dsb04100 Door/window Sensor Alarm Level'
friendly_name: 'Aeotec Dsb04100 Door/window Sensor Alarm Level 3'
emulated_hue: False
hidden: True
sensor.aeotec_dsb04100_doorwindow_sensor_alarm_level_4_1:
friendly_name: 'Aeotec Dsb04100 Door/window Sensor Alarm Level 4'
emulated_hue: False
hidden: True
sensor.aeotec_dsb04100_doorwindow_sensor_alarm_level_5_1:
friendly_name: 'Aeotec Dsb04100 Door/window Sensor Alarm Level'
friendly_name: 'Aeotec Dsb04100 Door/window Sensor Alarm Level 5'
emulated_hue: False
hidden: True
sensor.aeotec_dsb04100_doorwindow_sensor_alarm_level_6_1:
friendly_name: 'Aeotec Dsb04100 Door/window Sensor Alarm Level 6'
emulated_hue: False
hidden: True
@@ -31,7 +44,10 @@ sensor.aeotec_dsb04100_doorwindow_sensor_alarm_type_3_0:
emulated_hue: False
hidden: True
sensor.aeotec_dsb04100_doorwindow_sensor_alarm_type_4_0:
friendly_name: 'Aeotec Dsb04100 Door/window Sensor Alarm Type'
emulated_hue: False
hidden: True
sensor.aeotec_dsb04100_doorwindow_sensor_alarm_type_5_0:
@@ -39,8 +55,10 @@ sensor.aeotec_dsb04100_doorwindow_sensor_alarm_type_5_0:
emulated_hue: False
hidden: True
sensor.aeotec_dsb04100_doorwindow_sensor_alarm_type_6_0:
friendly_name: 'Aeotec Dsb04100 Door/window Sensor Alarm Type'
emulated_hue: False
hidden: True
sensor.alexa_echo:
friendly_name: 'Alexa Echo'

View File

@@ -2,3 +2,4 @@ doors:
name: Doors
entities:
- sensor.backdoor
- sensor.linen_door

View File

@@ -111,4 +111,8 @@
backdoor:
friendly_name: 'Back Door'
value_template: "{{ 'Open' if is_state('binary_sensor.aeotec_dsb04100_doorwindow_sensor_sensor_3_0', 'on') else 'Closed' }}"
value_template: "{{ 'Opened' if is_state('binary_sensor.aeotec_dsb04100_doorwindow_sensor_sensor_3_0', 'on') else 'Closed' }}"
linen_door:
friendly_name: 'Linen Door'
value_template: "{{ 'Opened' if is_state('binary_sensor.aeotec_dsb04100_doorwindow_sensor_sensor_4_0', 'on') else 'Closed' }}"