Working on #87 - Adding dash button for my Medicine.

This commit is contained in:
CCOSTAN
2017-03-12 05:24:56 +00:00
parent 1e28e94e52
commit e5ab0b938a
5 changed files with 37 additions and 6 deletions

View File

@@ -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, youre 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 -%}

View File

@@ -6,8 +6,6 @@
trigger:
- platform: event
event_type: brooklyn_dash
- platform: event
event_type: simplehuman_dash
action:
- service: light.toggle

24
automation/medicine_logger.yaml Executable file
View File

@@ -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

View File

@@ -5,3 +5,7 @@ home_stats:
responsibilities:
name: responsibilities
initial: off
medicine:
name: medicine
initial: off

View File

@@ -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"