Advertisement
Guest User

Untitled

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