diff --git a/custom_templates/status.jinja b/custom_templates/status.jinja index 8a1f5ad..b08797c 100644 --- a/custom_templates/status.jinja +++ b/custom_templates/status.jinja @@ -128,3 +128,41 @@ Kallen is staying elsewhere overnight. {% endif %} {% endmacro %} +{% macro twitchStreamInfo(method) %} +{% from 'time.jinja' import next_twitch_stream %} +{% set streamstart = state_attr('input_datetime.tony_streaming_start_time','timestamp') | timestamp_custom('%-I:%M %p',false) %} +{% set game = state_attr('sensor.twitch_ironnerd24','game') %} +{% set viewers = state_attr('sensor.twitch_ironnerd24','viewers') %} +{% if is_state('sensor.twitch_ironnerd24','streaming') %} +Tony is currently streaming. The current stream category is {{ game }}. The current viewer count is {{ viewers }}. +{% elif is_state('input_boolean.tony_streaming_today','on') %} + {% if method == 'tts' %} + {{ [ + "Tony will be pretending to be a real content creator tonight. ", + "Tony will be doing his best to defeat his impostor syndrome tonight. ", + "Tony will be playing video games and yelling into a microphone tonight. ", + "Tony will be scraping out the nickels and dimes tonight for the sake of entertainment. ", + "Tony is not really all that funny, but tonight he will present himself to a crowd of questionable individuals who seem to think that he is. " + ] | random }} The studio is scheduled to go online at {{ streamstart }}. " + {% elif method == 'text' %} + Tony will be streaming today. Stream starts at {{ streamstart }}. + {% endif %} +{% else %} +Tony does not have a stream scheduled today. The next scheduled stream is in {{ next_twitch_stream() }} approximately. +{% endif %} +{% endmacro %} + +{% macro tonyStatusReport(type,method) %} +{% from 'status.jinja' import medReportTony, twitchStreamInfo %} +{% from 'time.jinja' import ct %} +{% if type == 'meds' %} +{{ medReportTony() }} +{% endif %} +{% if type == 'stream' %} +{{ twitchStreamInfo(method) }} +{% endif %} +{% if type == 'full' %} +{{ medReportTony() }} +{{ twitchStreamInfo(method) }} +{% endif %} +{% endmacro %} \ No newline at end of file diff --git a/templates/speech/daily_briefing.yaml b/templates/speech/daily_briefing.yaml index e4225ff..70b67be 100644 --- a/templates/speech/daily_briefing.yaml +++ b/templates/speech/daily_briefing.yaml @@ -2,8 +2,8 @@ {# Daily Briefing #} {%- macro getReport() -%} {% from 'speech.jinja' import greeting, dadjoke, inspirational_quote %} - {% from 'time.jinja' import input_datetime_12hr, next_twitch_stream %} - {% from 'status.jinja' import emma_sleep %} + {% from 'time.jinja' import input_datetime_12hr %} + {% from 'status.jinja' import emma_sleep, tonyStatusReport %} {% from 'easy_time.jinja' import count_the_days, custom_time %}
{{ greeting() }} @@ -282,17 +282,7 @@ ] | random }} at {{ input_datetime_12hr('input_datetime.tina_workday_start') }}. {% endif %} - {% if is_state('input_boolean.tony_streaming_today','on') %} - {{ [ - "Tony will be pretending to be a real content creator tonight. ", - "Tony will be doing his best to defeat his impostor syndrome tonight. ", - "Tony will be playing video games and yelling into a microphone tonight. ", - "Tony will be scraping out the nickels and dimes tonight for the sake of entertainment. ", - "Tony is not really all that funny, but tonight he will present himself to a crowd of questionable individuals who seem to think that he is. " - ] | random }} The studio is scheduled to go online at {{ input_datetime_12hr('input_datetime.tony_streaming_start_time') }}. " - {% else %} - "Tony does not have a stream scheduled today. His next scheduled stream is in {{ next_twitch_stream() }}. " - {% endif %} + {{ tonyStatusReport('stream','tts') }} {% if is_state('input_boolean.kallen_school_today', 'on') %} {% if is_state('sensor.school_start_days2go', '0') %}