More Door Work. #112

This commit is contained in:
CCOSTAN 2017-04-15 22:12:39 +00:00
parent 24e50fc8af
commit c37d968a1e
5 changed files with 18 additions and 10 deletions

View File

@ -7,18 +7,22 @@
- platform: state
entity_id:
- sensor.backdoor
- sensor.sliding_door
to: 'Opened'
action:
- service: input_boolean.turn_on
entity_id: input_boolean.alert_mode
- service: script.Voice_notify
data_template:
DoorOpened: "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: ''
- wait_template: "{{ states.media_player.livingroomCC.states != 'playing' }}"
timeout: 00:00:30
- service: script.Voice_notify
data_template:
DoorOpened: "The {{ trigger.entity_id.split('.')[1]|replace('_', ' ') }} has been {{ (trigger.to_state.state)|replace('_', ' ') }}."

View File

@ -3,9 +3,6 @@ binary_sensor.__sensor_4_0:
emulated_hue: False
hidden: True
binary_sensor.__sensor_6_0:
friendly_name: ' Sensor'
emulated_hue: False

View File

@ -3,5 +3,5 @@ doors:
entities:
- sensor.backdoor
- sensor.linen_door
- binary_sensor.sliding_door_opened
- binary_sensor.front_door_opened
- sensor.front_door
- sensor.sliding_door

View File

@ -23,7 +23,6 @@ dog_bark:
state: 'on'
- service: switch.turn_on
entity_id: switch.living_room_amp
#- delay: '00:00:05'
- service: media_player.turn_on
entity_id: media_player.livingroomCC

View File

@ -116,3 +116,11 @@
linen_door:
friendly_name: 'Linen Door'
value_template: "{{ 'Opened' if is_state('binary_sensor.aeotec_dsb04100_doorwindow_sensor_sensor_4_0', 'on') else 'Closed' }}"
front_door:
friendly_name: 'Front Door'
value_template: "{{ 'Opened' if is_state('binary_sensor.front_door_opened', 'on') else 'Closed' }}"
sliding_door:
friendly_name: 'Sliding Door'
value_template: "{{ 'Opened' if is_state('binary_sensor.sliding_door_opened', 'on') else 'Closed' }}"