mirror of
https://github.com/thejeffreystone/home-assistant-configuration.git
synced 2025-02-09 00:55:08 +00:00
Lots of updates here. Updated my Readme - Added Affiliate Links, added some more information, better organized devices Updated gitignore with paths realtive to my hassio config Combined my switches and lights into single yaml files instead of the directory structure previously Added zigbee2mqtt.yaml to packages - contains automations and such for zigbee2mqtt Archived my previous version in the V4-config branch.
35 lines
2.2 KiB
YAML
Executable File
35 lines
2.2 KiB
YAML
Executable File
>
|
|
{# Twitter Stats #}
|
|
{%- macro getRandomStat() -%}
|
|
{{- [
|
|
"Thanks to Home Assistant and Amazon Polly and #AWS I have spoken for {{ states.sensor.speech_time.attributes.value }} in the last 7 days.",
|
|
"I am constantly monitoring Anchorage House. For instance I know that the washer has ran for {{ states.sensor.washer_time.attributes.value }} in the last 7 days.",
|
|
"I am using {{ states.sensor.sensor_count.state }} sensors to power {{ states.sensor.automation_count.state}} automations and {{ states.sensor.script_count.state}} scripts to
|
|
automate Anchorage House thanks to Home Assistant.",
|
|
"My config on Github (https://github.com/thejeffreystone/home-assistant-configuration) has {{ states.sensor.home_assistant_configuration.attributes.stargazers}} stars and counting. Currently with {{ states.sensor.github_stats.attributes.open_issues }} open #Todo items.",
|
|
"I am running Home Assistant version {{ states.sensor.installed_version.state }} (https://github.com/thejeffreystone/home-assistant-configuration)"
|
|
"My configuration is at https://github.com/thejeffreystone/home-assistant-configuration and currently has {{ states.sensor.home_assistant_configuration.attributes.stargazers}} stargazers. You could be one too.",
|
|
"My configuration is at https://github.com/thejeffreystone/home-assistant-configuration .The last commit was {{ states.sensor.home_assistant_configuration.attributes.latest_commit_message}}.",
|
|
"You can watch videos about how I came to be and all the cool things I'm learning to do at https://www.youtube.com/channel/UCipZJ6748kd8TbelSxcvcVg "
|
|
] | random -}}
|
|
{%- endmacro -%}
|
|
{%- macro getTags() -%}
|
|
#homeassistant #iot #smarthome
|
|
{%- 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() -%}
|
|
{{ getRandomStat() }}
|
|
{{ getTags() }}
|
|
{%- endmacro -%}
|
|
|
|
{# Call the macro #}
|
|
{{- cleanup(mother_of_all_macros()) -}}
|
|
|