From e5ab0b938a1e71171b617caf55487271007cdc37 Mon Sep 17 00:00:00 2001 From: CCOSTAN Date: Sun, 12 Mar 2017 05:24:56 +0000 Subject: [PATCH] Working on #87 - Adding dash button for my Medicine. --- automation/Speech/announcements.yaml | 7 ++++--- automation/dash_buttons.yaml | 2 -- automation/medicine_logger.yaml | 24 ++++++++++++++++++++++++ input_boolean/hidden_booleans.yaml | 4 ++++ sensor/MQTT.yaml | 6 +++++- 5 files changed, 37 insertions(+), 6 deletions(-) create mode 100755 automation/medicine_logger.yaml diff --git a/automation/Speech/announcements.yaml b/automation/Speech/announcements.yaml index c1d03a4f..9422186c 100755 --- a/automation/Speech/announcements.yaml +++ b/automation/Speech/announcements.yaml @@ -23,13 +23,14 @@ {% set person = trigger.entity_id.split('.')[1]|replace('_', ' ')%} {%- macro greeting_sentence(person) -%} {{ [ - "Welcome home " ~ person, + "Welcome back home " ~ person, "Guess who is home? " ~ person +" is!", - "Attention: " ~ person + " is now in the house.", - "Welcome Home " ~ person + ". We've missed you. or at least Molly did.", + "Attention! " ~ person + " is now in the house.", + "Welcome Home " ~ person + ". We've missed you. Or at least Molly did.", "Our home is now complete, Rest your head and relax your feet! Welcome Back " ~ person, "Life is like a song, you’re back where you belong. Welcome home " ~ person, "Hey there " ~ person + " Welcome Home!", + "Knock Knock. Who is There? " ~ person +" is!", person ~ "! You're home!" ] | random }} {%- endmacro -%} diff --git a/automation/dash_buttons.yaml b/automation/dash_buttons.yaml index 5275f2a8..bdb2cb4c 100755 --- a/automation/dash_buttons.yaml +++ b/automation/dash_buttons.yaml @@ -6,8 +6,6 @@ trigger: - platform: event event_type: brooklyn_dash - - platform: event - event_type: simplehuman_dash action: - service: light.toggle diff --git a/automation/medicine_logger.yaml b/automation/medicine_logger.yaml new file mode 100755 index 00000000..18b62827 --- /dev/null +++ b/automation/medicine_logger.yaml @@ -0,0 +1,24 @@ +################################### +## LOG IFTTT Stuff - Rachio +################################### +- alias: 'Log Sprinkler Activity' + hide_entity: True + trigger: + - platform: event + event_type: simplehuman_dash + + action: + + - service: input_boolean.turn_on + entity_id: input_boolean.medicine + + - service: logbook.log + data: + name: "Medicine Push" + message: "Took Medicine today." + + - service: mqtt.publish + data_template: + payload: '{{ states("sensor.date") }}' + topic: 'dash/simplehuman/medicine_time' + retain: true diff --git a/input_boolean/hidden_booleans.yaml b/input_boolean/hidden_booleans.yaml index 2532f064..68144c3f 100755 --- a/input_boolean/hidden_booleans.yaml +++ b/input_boolean/hidden_booleans.yaml @@ -5,3 +5,7 @@ home_stats: responsibilities: name: responsibilities initial: off + +medicine: + name: medicine + initial: off diff --git a/sensor/MQTT.yaml b/sensor/MQTT.yaml index 9d4a6940..fba51ea3 100755 --- a/sensor/MQTT.yaml +++ b/sensor/MQTT.yaml @@ -8,4 +8,8 @@ - platform: mqtt state_topic: "ifttt/rachio/watering_time" - name: "ifttt_rachio_watering_time" + name: "Rachio_watering_time" + +- platform: mqtt + state_topic: "dash/simplehuman/medicine_time" + name: "Medicine time"