Advertisement
dawnlordz

Untitled

Dec 11th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 4.29 KB | None | 0 0
  1. #coffee done
  2.     coffeedone:  
  3.         sequence:
  4.           - service: script.turn_on
  5.             data_template:
  6.               entity_id: >
  7.                {% if is_state('media_player.all', 'off') %}
  8.                   script.coffeedone_tts
  9.                 {% else %}
  10.                   script.coffeedone_notts
  11.                 {% endif %}
  12.  
  13.          
  14. #coffee done
  15.     coffeedone_tts:  
  16. #    coffeedone:
  17.         sequence:
  18.           - service: light.turn_off
  19.             data:
  20.               entity_id: light.kaffe
  21.           - service: light.turn_on
  22.             data:
  23.               entity_id: light.kitchen_sink,light.kitchen_sink_two #dim lights
  24.               brightness: 127
  25.           - delay: 00:00:01
  26.           - service: media_player.turn_on
  27.             data:
  28.               entity_id: media_player.kitchen
  29.           - service: media_player.volume_set
  30. #            data:
  31. #              entity_id: media_player.kitchen
  32. #              volume_level: '0.5'
  33.             data_template:
  34.               entity_id: media_player.kitchen
  35.               volume_level: >
  36.               0.4
  37.           - service: tts.amazon_polly_say #google_say amazon_polly_say voicerss
  38.             data_template:
  39.               entity_id: media_player.kitchen
  40.               message: >
  41.               {% if now().strftime("%H")|int < 12 %}
  42.                {{["Caution hot coffee",
  43.                "The only thing i know for sure about today is coffee. Everything else is just wild speculations.",
  44.                "Life is scary without coffee.",
  45.                "Once you wake up and smell the coffee, it’s hard to go back to sleep.",
  46.                "Even bad coffee is better than no coffee at all.",
  47.                "nothing make sense before coffee",
  48.                "Time fore awesomeness",
  49.                "Coffee is the best thing to douse the sunrise with.",
  50.                "Doctors found traces of blood in my coffee stream."
  51.                ] | random}} ...
  52.                {% elif now().strftime("%H")|int < 18 %}
  53.                {{["It's coffee o clock",
  54.                "The only good substitute for a coffee is two coffees.",
  55.                "My only plan today is coffee.",
  56.                "Caffeine rules.",
  57.                "Everyone should believe in something. I believe I will have another coffee.",
  58.                "Caffeine — It maintains my sunny personality.",
  59.                "Coffee smells like freshly ground heaven."
  60.                ] | random}} ...
  61.                {% elif now().strftime("%H")|int < 07 %}
  62.                {{["Any time is coffee time.",
  63.                "Never forget coffee.",
  64.                "Get more out of life with coffee.",
  65.                "Here you go. Grab your coffee",
  66.                "Never Underestimate the Importance of Being Properly Caffeinated.",
  67.                "Good Coffee – Cheaper than Prozac!",
  68.                "People say money can’t buy happiness. They Lie. Money buys Coffee, Coffee makes Me Happy!",
  69.                "Decaffeinated coffee is like a hairless cat, it exists, but that doesn’t make it right.",
  70.                "Sometimes I stay up so late that I have my morning coffee before I go to bed."
  71.                ] | random}} ...              
  72.                {% else %}
  73.                {{["Any time is coffee time.",
  74.                "Never forget coffee.",
  75.                "Get more out of life with coffee.",
  76.                "Here you go. Grab your coffee",
  77.                "Never Underestimate the Importance of Being Properly Caffeinated.",
  78.                "Good Coffee – Cheaper than Prozac!",
  79.                "People say money can’t buy happiness. They Lie. Money buys Coffee, Coffee makes Me Happy!",
  80.                "Decaffeinated coffee is like a hairless cat, it exists, but that doesn’t make it right.",
  81.                "Sometimes I stay up so late that I have my morning coffee before I go to bed."
  82.                ] | random}} ...
  83.                {% endif %}
  84.                {{ speech_message | replace("\n","") | replace("   ","") | replace("  "," ") }}
  85.  
  86. #coffee done
  87.     coffeedone_notts:  
  88.         sequence:
  89.           - service: light.turn_off
  90.             data:
  91.               entity_id: light.kaffe
  92.           - service: light.turn_on
  93.             data:
  94.               entity_id: light.kitchen_sink,light.kitchen_sink_two #dim lights
  95.               brightness: 127
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement