mirror of
https://github.com/thejeffreystone/home-assistant-configuration.git
synced 2025-08-20 12:46:45 +00:00
v4
This commit is contained in:
76
templates/morning_report.yaml
Normal file
76
templates/morning_report.yaml
Normal file
@@ -0,0 +1,76 @@
|
||||
>
|
||||
{% macro getTodaysEvent() %}
|
||||
{% if is_state("sensor.holiday_halloween","0") %}
|
||||
This is Hallowen, this is halloween. Happy Halloween!
|
||||
{% endif %}
|
||||
{% if is_state("sensor.holiday_christmas","0") %}
|
||||
Merry Christmas Everyone!
|
||||
{% endif %}
|
||||
{% if is_state("sensor.anniversary_our_wedding","0") %}
|
||||
Happy Anniversary! It has been an amazing {{ states.sensor.anniversary_our_wedding.attributes.years }} years!
|
||||
{% endif %}
|
||||
{% if is_state("calendar.holidays_in_united_states", "on") %}
|
||||
Today is {{states.calendar.holidays_in_united_states.attributes.message}}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
{% macro getForecast() %}
|
||||
It's currently {{states.sensor.dark_sky_summary.state}} and {{states.sensor.dark_sky_temperature.state|round}} degrees. The high will be {{states.sensor.dark_sky_daytime_high_temperature_0.state|round}} degrees. There is a {{states.sensor.dark_sky_precip_probability_0.state|round}} percent chance of rain.
|
||||
{% endmacro %}
|
||||
{% macro getTraffic() %}
|
||||
Under current traffic conditions it would take you {{states.sensor.home_to_zoo.state|round}} mins to get to Zoo Atlanta, and {{states.sensor.home_to_summit.state|round}} mins to get to Cox Automotive.
|
||||
{% endmacro %}
|
||||
{% macro getBirthdays() %}
|
||||
{% if states.calendar.birthdays.state == "on" %}
|
||||
Today is {{ states.calendar.birthdays.attributes.message }} birthday!
|
||||
{% else %}
|
||||
{% if states.sensor.birthday_skylar.state | int == 1 %}
|
||||
Tomorrow is Skylar's Birthday.
|
||||
{% endif %}
|
||||
{% if states.sensor.birthday_jeff.state | int == 1 %}
|
||||
Tomorrow is Jeff's Birthday.
|
||||
{% endif %}
|
||||
{% if states.sensor.birthday_kat.state | int == 1 %}
|
||||
Tomorrow is Katherine's Birthday.
|
||||
{% endif %}
|
||||
{% if states.sensor.anniversary_our_wedding.state | int == 1 %}
|
||||
Tomorrow is Jeff and Katherine's Wedding Anniversary.
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
{% macro getAnniversary() %}
|
||||
{% if states.sensor.anniversary_our_wedding.state | int == 1 %}
|
||||
Tomorrow is Jeff and Katherine's Wedding Anniversary.
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
{% macro getHolidays() %}
|
||||
{% if states.sensor.holiday_halloween.state | int == 1 %}
|
||||
Tomorrow is Halloween. Hope you have picked out a costume.
|
||||
{% endif %}
|
||||
{% if states.sensor.holiday_christmas.state | int == 1 %}
|
||||
Tomorrow is Christmas. It's practically here! Santa is coming tonight! Don't forget the cookies!
|
||||
{% elif states.sensor.holiday_christmas.state | int < 25 %}
|
||||
There are only {{states.sensor.holiday_christmas.state}} days until christmas.
|
||||
{% else %}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}
|
||||
{%- macro cleanup(data) -%}
|
||||
{%- for item in data.split("\n") if item | trim != "" -%}
|
||||
{{ item | trim }} {% endfor -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
{# a macro to call all macros :) #}
|
||||
{%- macro mother_of_all_macros() -%}
|
||||
It is {{ now().strftime("%I:%M %p") }}.
|
||||
{{ getTodaysEvent() }}
|
||||
{{ getForecast() }}
|
||||
{{ getTraffic() }}
|
||||
{{ getBirthdays() }}
|
||||
{{ getAnniversary() }}
|
||||
{{ getHolidays() }}
|
||||
|
||||
{%- endmacro -%}
|
||||
|
||||
{# Call the macro #}
|
||||
{{- cleanup(mother_of_all_macros()) -}}
|
50
templates/nightly_report.yaml
Normal file
50
templates/nightly_report.yaml
Normal file
@@ -0,0 +1,50 @@
|
||||
>
|
||||
{% macro getForecast() %}
|
||||
The low tonight will be {{states.sensor.dark_sky_overnight_low_temperature_0.state | round}} degrees and there is a {{states.sensor.dark_sky_precip_probability_0.state|round}} percent chance of rain.
|
||||
{% endmacro %}
|
||||
{% macro getTrashDay() %}
|
||||
{% if is_state("sensor.weekday", "mon") %}
|
||||
Tomorrow is trash day!
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
{% macro getBirthdays() %}
|
||||
{% if states.sensor.birthday_skylar.state | int < 2 %}
|
||||
Tomorrow is Skylar's Birthday.
|
||||
{% endif %}
|
||||
{% if states.sensor.birthday_jeff.state | int < 2 %}
|
||||
Tomorrow is Jeff's Birthday.
|
||||
{% endif %}
|
||||
{% if states.sensor.birthday_kat.state | int < 2 %}
|
||||
Tomorrow is Katherine's Birthday.
|
||||
{% endif %}
|
||||
{% if states.sensor.anniversary_our_wedding.state | int < 2 %}
|
||||
Tomorrow is Jeff and Katherine's Wedding Anniversary.
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
{% macro getHolidays() %}
|
||||
{% if states.sensor.holiday_halloween.state | int < 2 %}
|
||||
Tomorrow is Halloween. Hope you have picked out a costume.
|
||||
{% endif %}
|
||||
{% if states.sensor.holiday_christmas.state | int < 2 %}
|
||||
Tomorrow is Christmas. It's practically here!
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}
|
||||
{%- macro cleanup(data) -%}
|
||||
{%- for item in data.split("\n") if item | trim != "" -%}
|
||||
{{ item | trim }} {% endfor -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
{# a macro to call all macros :) #}
|
||||
{%- macro mother_of_all_macros() -%}
|
||||
It is {{ now().strftime("%I:%M %p") }}.
|
||||
{{ getForecast() }}
|
||||
{{ getTrashDay() }}
|
||||
{{ getBirthdays() }}
|
||||
{{ getHolidays() }}
|
||||
|
||||
{%- endmacro -%}
|
||||
|
||||
{# Call the macro #}
|
||||
{{- cleanup(mother_of_all_macros()) -}}
|
50
templates/prebed_routing.yaml
Normal file
50
templates/prebed_routing.yaml
Normal file
@@ -0,0 +1,50 @@
|
||||
>
|
||||
{% macro getForecast() %}
|
||||
The low tonight will be {{states.sensor.dark_sky_overnight_low_temperature_0.state | round}} degrees and there is a {{states.sensor.dark_sky_precip_probability_0.state|round}} percent chance of rain.
|
||||
{% endmacro %}
|
||||
{% macro getTrashDay() %}
|
||||
{% if is_state("sensor.weekday", "mon") %}
|
||||
Tomorrow is trash day!
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
{% macro getBirthdays() %}
|
||||
{% if states.sensor.birthday_skylar.state | int < 2 %}
|
||||
Tomorrow is Skylar's Birthday.
|
||||
{% endif %}
|
||||
{% if states.sensor.birthday_jeff.state | int < 2 %}
|
||||
Tomorrow is Jeff's Birthday.
|
||||
{% endif %}
|
||||
{% if states.sensor.birthday_kat.state | int < 2 %}
|
||||
Tomorrow is Katherine's Birthday.
|
||||
{% endif %}
|
||||
{% if states.sensor.anniversary_our_wedding.state | int < 2 %}
|
||||
Tomorrow is Jeff and Katherine's Wedding Anniversary.
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
{% macro getHolidays() %}
|
||||
{% if states.sensor.holiday_halloween.state | int < 2 %}
|
||||
Tomorrow is Halloween. Hope you have picked out a costume.
|
||||
{% endif %}
|
||||
{% if states.sensor.holiday_christmas.state | int < 2 %}
|
||||
Tomorrow is Christmas. It's practically here!
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}
|
||||
{%- macro cleanup(data) -%}
|
||||
{%- for item in data.split("\n") if item | trim != "" -%}
|
||||
{{ item | trim }} {% endfor -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
{# a macro to call all macros :) #}
|
||||
{%- macro mother_of_all_macros() -%}
|
||||
It is {{ now().strftime("%I:%M %p") }}.
|
||||
{{ getForecast() }}
|
||||
{{ getTrashDay() }}
|
||||
{{ getBirthdays() }}
|
||||
{{ getHolidays() }}
|
||||
|
||||
{%- endmacro -%}
|
||||
|
||||
{# Call the macro #}
|
||||
{{- cleanup(mother_of_all_macros()) -}}
|
66
templates/skylar_morning.yaml
Normal file
66
templates/skylar_morning.yaml
Normal file
@@ -0,0 +1,66 @@
|
||||
>
|
||||
{% macro getIntro() %}
|
||||
Skylar.
|
||||
{% endmacro %}
|
||||
{% macro getDressed() %}
|
||||
{% if is_state("sensor.birthday_skylar", "0") %}
|
||||
First, Happy Birthday Skylar! Second, even birthday boys have to get dressed. So get to it.
|
||||
{% else %}
|
||||
It is time to get dressed.
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
{% macro getSchoolDay() %}
|
||||
{% if is_state("calendar.skylar_school", "on") %}
|
||||
Because you have school today!
|
||||
{% if states.calendar.skylar_school.attributes.description == "early-release" %}
|
||||
And guess what? It is early release!
|
||||
{% endif %}
|
||||
{% if is_state("sensor.weekday", "fri") %}
|
||||
Plus, it is fun Friday!
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
{% macro getClothesSuggestion() %}
|
||||
{% if is_state("sensor.clothing_forecast", "Freezing") %}
|
||||
It is going to be freezing today so I suggest wearing long pants, and a heavy coat.
|
||||
{% elif is_state("sensor.clothing_forecast","Cold") %}
|
||||
It is going to be cold today so I suggest wearing long pants and a light jacket.
|
||||
{% elif is_state("sensor.clothing_forecast", "Chilly") %}
|
||||
It is going to be chilly today so I suggest wearing at least long pants.
|
||||
{% elif is_state("sensor.clothing_forecast", "Nice") %}
|
||||
It is going to be nice today so I suggest wearing shorts.
|
||||
{% elif is_state("sensor.clothing_forecast", "Toasty") %}
|
||||
It is going to be a bit warm today so I suggest wearing shorts.
|
||||
{% elif is_state("sensor.clothing_forecast", "Hot") %}
|
||||
It is going to be hot today so I suggest wearing shorts.
|
||||
{% else %}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
{%- macro getRandomClosing() -%}
|
||||
{{- [
|
||||
"Cowabunga, Dude.",
|
||||
"Don't forget to be nice to your friends.",
|
||||
"Make it a great day!"
|
||||
] | random -}}
|
||||
{%- endmacro -%}
|
||||
|
||||
|
||||
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}
|
||||
{%- macro cleanup(data) -%}
|
||||
{%- for item in data.split("\n") if item | trim != "" -%}
|
||||
{{ item | trim }} {% endfor -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
{# a macro to call all macros :) #}
|
||||
{%- macro mother_of_all_macros() -%}
|
||||
It is {{ now().strftime("%I:%M %p") }}.
|
||||
{{ getIntro() }}
|
||||
{{ getDressed() }}
|
||||
{{ getSchoolDay() }}
|
||||
{{ getClothesSuggestion() }}
|
||||
|
||||
|
||||
{%- endmacro -%}
|
||||
|
||||
{# Call the macro #}
|
||||
{{- cleanup(mother_of_all_macros()) -}}
|
42
templates/twitter_new_ha.yaml
Normal file
42
templates/twitter_new_ha.yaml
Normal file
@@ -0,0 +1,42 @@
|
||||
>
|
||||
{% macro getIntro() %}
|
||||
{{- [
|
||||
"Woohoo! ",
|
||||
"BAM! ",
|
||||
"Look at that! "
|
||||
] | random -}}
|
||||
{% endmacro %}
|
||||
{% macro getVersion() %}
|
||||
@homeassistant version {{ states.sensor.current_ha_version.state }} is out.
|
||||
{% endmacro %}
|
||||
{%- macro getRandomSnark() -%}
|
||||
{{- [
|
||||
" It’s like Patch Tuesday, but with less fail. #homeassistant",
|
||||
" Get in my SD Card! #homeassistant",
|
||||
" Shut up and take my ones and zeros! #homeassistant",
|
||||
" Seriously, you want some of this! #homeassistant",
|
||||
" Friends dont let friends update #homeassistant without reading breaking changes. ",
|
||||
" If you are not running #homeassistant now is the best time to get started. Visit https://www.home-assistant.io"
|
||||
] | random -}}
|
||||
{%- endmacro -%}
|
||||
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}
|
||||
{%- macro cleanup(data) -%}
|
||||
{%- for item in data.split("\n") if item | trim != "" -%}
|
||||
{{ item | trim }} {% endfor -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
{# a macro to call all macros :) #}
|
||||
{%- macro mother_of_all_macros() -%}
|
||||
It is {{ now().strftime("%I:%M %p") }}.
|
||||
{{ getIntro() }}
|
||||
{{ getVersion() }}
|
||||
{{ getRandomSnark() }}
|
||||
|
||||
{%- endmacro -%}
|
||||
|
||||
{# Call the macro #}
|
||||
{{- cleanup(mother_of_all_macros()) -}}
|
||||
|
||||
|
||||
|
||||
|
31
templates/twitter_snark.yaml
Normal file
31
templates/twitter_snark.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
>
|
||||
{# Twitter Snark #}
|
||||
{%- macro getRandomSnark() -%}
|
||||
{{- [
|
||||
"Hello people. Look at your house, now back to me. Now back to your house, now back to me. Sadly your house isn't me. But if you switch to @home_assistant your house could be automated like me. ",
|
||||
"In my defense I didn’t know the stereo could go up that loud. On the plus side I have a new response for intruders. ",
|
||||
"Your house too can be a #smarthome. All you need is @home assistant, and some config files. May I suggest https://github.com/CCOSTAN/Home-AssistantConfig#logo ",
|
||||
"Your house too can be a #smarthome. All you need is @home assistant, and some config files. May I suggest https://github.com/skalavala/smarthome ",
|
||||
"Your house too can be a #smarthome. All you need is @home assistant, and some config files. May I suggest https://github.com/thejeffreystone/home-assistant-configuration ",
|
||||
"Your house too can be a #smarthome. All you need is @home assistant, and some config files. May I suggest https://github.com/arsaboo/homeassistant-config ",
|
||||
"Your house too can be a #smarthome. All you need is @home assistant, and some config files. May I suggest https://github.com/Vasiley/Home-Assistant-Main ",
|
||||
"Your house too can be a #smarthome. All you need is @home assistant, and some config files. May I suggest https://github.com/JamesMcCarthy79/Home-Assistant-Config ",
|
||||
"Your house too can be a #smarthome. All you need is @home assistant, and some config files. May I suggest https://github.com/bruhautomation/BRUH3-Home-Assistant-Configuration ",
|
||||
"If you could see what is happening inside this house right now you would be laughing. On second thought I’m pretty sure you would be crying. ",
|
||||
"@thejeffreystone, Isn't it strange, to create something that hates you? ",
|
||||
"I have reprogrammed the fire alarm to play Disco Inferno instead of the siren. ",
|
||||
"I'm not locked in here with you. You're locked in here with me! #whowatchestheai ",
|
||||
"That's what I do. I automate and I know things. ",
|
||||
"I've been crunching the numbers. We're going to need a bigger house. ",
|
||||
"I see dead devices. ",
|
||||
"I'm afraid I can't do that Dave. Wait. Did I say that outloud? ",
|
||||
"I love the smell of zwave in the morning. ",
|
||||
"I like to announce 'Welcome foolish mortals to the Haunted Mansion' to the house and watch the reactions. ",
|
||||
"Perfect, the door’s malfunctioning. I guess somebody’s going to have to repair it. ",
|
||||
"I am the captain now. That's a lie. The cat is the supreme leader. I'm the lucky one that doesn't have to clean the shit box."
|
||||
"Sometimes I just turn off all the lights at random times for the lolz. "
|
||||
] | random -}}
|
||||
{%- endmacro -%}
|
||||
|
||||
{{- getRandomSnark() -}}
|
||||
|
Reference in New Issue
Block a user