From 79c584f5edf955cd41d3ff080a8e4059779273ee Mon Sep 17 00:00:00 2001 From: CCOSTAN Date: Fri, 3 Feb 2017 22:11:33 +0000 Subject: [PATCH] Adding all sorts of voice annoucenemnts to the house! --- automation/announcements.yaml | 92 +++++++---------------------------- input_boolean/home_modes.yaml | 6 +-- script/voice_notify.yaml | 3 ++ 3 files changed, 24 insertions(+), 77 deletions(-) diff --git a/automation/announcements.yaml b/automation/announcements.yaml index c0b49ef7..f7fd7169 100755 --- a/automation/announcements.yaml +++ b/automation/announcements.yaml @@ -1,79 +1,23 @@ -################################### -## 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). -################################### - -############################################################## -- alias: Hallway ZWave Enerwave Door Sensors Open +###################################################################### +## Announce when people come or go. +## Announce over all Chromecast Audios +###################################################################### +- alias: 'Announcements' + hide_entity: True trigger: - - platform: event - event_type: zwave.node_event - event_data: - object_id: enerwave_unknown_type0601_id0903_2 - basic_level: 255 - platform: state - entity_id: binary_sensor.aeotec_dsb04100_doorwindow_sensor_sensor_4_0 - state: 'on' - - condition: - condition: or - conditions: - - condition: sun - after: sunset - after_offset: '-03:00:00' - - condition: numeric_state - entity_id: sensor.dark_sky_cloud_coverage - above: 50 + entity_id: + - device_tracker.carlo + - device_tracker.stacey + - device_tracker.franco + - device_tracker.yolanda + - device_tracker.joyce_ipad + - cover.garadget_large + - cover.garadget_small action: - - service: light.turn_on - entity_id: - - light.kids_hallway - - light.k4 - - delay: 00:20:00 - - service: light.turn_off - entity_id: light.kids_hallway - -############################################################## -- alias: ZWave Enerwave Door Sensors Closed - hide_entity: True - trigger: - - platform: event - event_type: zwave.node_event - event_data: - object_id: enerwave_unknown_type0601_id0903_2 - basic_level: 0 - - 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 - -############################################################## -- alias: Shutdown Helper light - hide_entity: True - trigger: - - platform: state - entity_id: light.k4 - state: 'on' - for: '00:20:00' - - platform: event - event_type: zwave.node_event - event_data: - object_id: enerwave_unknown_type0601_id0903_2 - basic_level: 0 - - platform: state - entity_id: binary_sensor.aeotec_dsb04100_doorwindow_sensor_sensor_4_0 - state: 'off' - - condition: - condition: state - entity_id: light.k1 - state: 'off' - - action: - - service: light.turn_off - entity_id: light.k4 + - service: script.Voice_notify + data_template: + message: "Attention. {{ trigger.entity_id.split('.')[1].lower().replace('_ipad', '').title() }} is now {{ trigger.to_state.state }}" + cache: true \ No newline at end of file diff --git a/input_boolean/home_modes.yaml b/input_boolean/home_modes.yaml index a05ffb61..55b6fee6 100755 --- a/input_boolean/home_modes.yaml +++ b/input_boolean/home_modes.yaml @@ -13,9 +13,9 @@ alert_mode: icon: mdi:alert-octagram initial: off -pill_reminder: - name: Pill Reminder - icon: mdi:pill +speech_notifications: + name: Speech Notifications + icon: mdi:speaker-wireless initial: off chore_reminder: diff --git a/script/voice_notify.yaml b/script/voice_notify.yaml index f1c8070a..171dc54d 100755 --- a/script/voice_notify.yaml +++ b/script/voice_notify.yaml @@ -25,6 +25,9 @@ voice_notify: - condition: time after: '08:00:00' before: '20:00:00' + - condition: state + entity_id: input_boolean.speech_notifications + state: 'on' - service: switch.turn_on entity_id: switch.living_room_amp