From 7d46498bfb31da81e901e02b5010a6b88c3318e0 Mon Sep 17 00:00:00 2001 From: CCOSTAN Date: Sun, 5 Mar 2017 02:41:13 +0000 Subject: [PATCH] Closes #96 - Who let the dogs out? --- .HA_VERSION | 2 +- automation/guard_dog.yaml | 15 +++++++++++++++ configuration.yaml | 2 +- customize/input_booleans.yaml | 7 ++++++- input_boolean/trigger_booleans.yaml | 4 ++++ script/{dog_barking.yaml => dog_bark.yaml} | 8 ++------ script/front_house_motion.yaml | 1 + 7 files changed, 30 insertions(+), 9 deletions(-) create mode 100755 automation/guard_dog.yaml rename script/{dog_barking.yaml => dog_bark.yaml} (90%) diff --git a/.HA_VERSION b/.HA_VERSION index 8459c184..1f2864e6 100755 --- a/.HA_VERSION +++ b/.HA_VERSION @@ -1 +1 @@ -0.39.2 \ No newline at end of file +0.39.3 \ No newline at end of file diff --git a/automation/guard_dog.yaml b/automation/guard_dog.yaml new file mode 100755 index 00000000..b6dc2baf --- /dev/null +++ b/automation/guard_dog.yaml @@ -0,0 +1,15 @@ +###################################################################### +## Speak Max! Speak Max!! +###################################################################### + +- alias: Guard Dog + trigger: + - platform: state + entity_id: input_boolean.guard_dog + state: 'on' + from: 'off' + + action: + - service: script.dog_bark + - service: input_boolean.turn_off + entity_id: input_boolean.guard_dog diff --git a/configuration.yaml b/configuration.yaml index 47171f2e..eca9ea8e 100755 --- a/configuration.yaml +++ b/configuration.yaml @@ -22,7 +22,7 @@ frontend: group: !include_dir_merge_named group device_tracker: !include_dir_merge_list device_tracker -# discovery: - Disabled due to LOTS of bugs. +discovery: updater: sun: diff --git a/customize/input_booleans.yaml b/customize/input_booleans.yaml index debe9a55..a5088f31 100755 --- a/customize/input_booleans.yaml +++ b/customize/input_booleans.yaml @@ -11,10 +11,15 @@ input_boolean.alert_mode: input_boolean.flash: friendly_name: 'Flash' - emulated_hue: False + emulated_hue: True hidden: False icon: mdi:yin-yang +input_boolean.guard_dog: + friendly_name: 'Guard Dog' + emulated_hue: True + hidden: False + icon: mdi:paw input_boolean.good_morning: friendly_name: 'Good Morning' diff --git a/input_boolean/trigger_booleans.yaml b/input_boolean/trigger_booleans.yaml index c3c313ab..afc1919a 100755 --- a/input_boolean/trigger_booleans.yaml +++ b/input_boolean/trigger_booleans.yaml @@ -22,3 +22,7 @@ work: flash: name: Flash initial: off + +guard_dog: + name: Guard Dog + initial: off diff --git a/script/dog_barking.yaml b/script/dog_bark.yaml similarity index 90% rename from script/dog_barking.yaml rename to script/dog_bark.yaml index f30bbc20..d88326df 100755 --- a/script/dog_barking.yaml +++ b/script/dog_bark.yaml @@ -9,6 +9,8 @@ dog_bark: sequence: + - wait_template: "{{ states.media_player.livingroomCC.states != 'playing' }}" + timeout: 00:00:30 - condition: template value_template: > {% if is_state('media_player.livingroomCC', 'playing') %} @@ -16,9 +18,6 @@ dog_bark: {% else %} true {% endif %} - - condition: state - entity_id: input_boolean.alert_mode - state: 'on' - condition: state entity_id: input_boolean.speech_notifications state: 'on' @@ -42,9 +41,6 @@ dog_bark: 0.40 {% endif %} - - service: media_player.turn_on - entity_id: media_player.livingroomCC - - service: media_player.play_media data_template: entity_id: diff --git a/script/front_house_motion.yaml b/script/front_house_motion.yaml index 52ab0fbb..cc7f1a86 100755 --- a/script/front_house_motion.yaml +++ b/script/front_house_motion.yaml @@ -41,3 +41,4 @@ front_house_motion: brightness: 15 - delay: '00:00:10' - service: script.monthly_color_scene +