Fix Speech quote issue.

This commit is contained in:
CCOSTAN
2017-02-15 18:36:45 +00:00
parent 67949a092b
commit e47d7164c8
2 changed files with 24 additions and 30 deletions

View File

@@ -20,19 +20,18 @@
- service: script.Voice_notify - service: script.Voice_notify
data_template: data_template:
value1: > value1: >
{% set person = trigger.entity_id.split('.')[1]|replace('_', ' ')%} {% set person = trigger.entity_id.split('.')[1]|replace('_', ' ')%}
{% macro greeting_sentence(person) %} {%- macro greeting_sentence(person) -%}
{{ [ {{ [
"Welcome home " ~ person, "Welcome home " ~ person,
"Guess who is home? " ~ person +" is!", "Guess who is home? " ~ person +" is!",
"Attention: " ~ person + " is now in the house.", "Attention: " ~ person + " is now in the house.",
person ~ " in da hiz house!", person ~ " in da hiz Ouse!",
"Welcome Home " ~ person + ". We've missed you. or at least Molly did.", "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, "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, "Life is like a song, youre back where you belong. Welcome home " ~ person,
"Hey there " ~ person, "Hey there " ~ person,
person ~ "! You're home!" person ~ "! You're home!"
] | random }} ] | random }}
{% endmacro %} {%- endmacro -%}
{{greeting_sentence(person)}} "{{greeting_sentence(person)}}"

View File

@@ -25,15 +25,15 @@
- service: script.Voice_notify - service: script.Voice_notify
data_template: data_template:
value1: > value1: >
{% macro dark_outside() %} {%- macro dark_outside() -%}
{{ [ {{ [
"It is pretty dark outside. I will turn on the outside lights now.", "It is pretty dark outside. I will turn on the outside lights now.",
"It's a little past Sunset. Time to turn on the outside lights. I'm on it.", "It's a little past Sunset. Time to turn on the outside lights. I'm on it.",
"I'll switch on the outside lights. It's getting dark outside.", "I'll switch on the outside lights. It's getting dark outside.",
"Time to turn on the front lights. I'll take care of it." "Time to turn on the front lights. I'll take care of it."
] | random }} ] | random }}
{% endmacro %} {%- endmacro -%}
{{ dark_outside() }} "{{ dark_outside() }}"
###################################################################### ######################################################################
- alias: 'Sunset Stuff off' - alias: 'Sunset Stuff off'
@@ -50,8 +50,3 @@
- group.outdoor_pool_lights - group.outdoor_pool_lights
- group.all_lights - group.all_lights
- service: script.interior_off - service: script.interior_off