Housewide announcement for server maintenance
This commit is contained in:
@ -318,6 +318,15 @@ script:
|
||||
who: "{{ who if who is defined else 'everywhere' }}"
|
||||
call_we_are_leaving: 1
|
||||
|
||||
server_maintenance_annc:
|
||||
alias: Server Maintenance Announcement
|
||||
sequence:
|
||||
- service: script.status_annc
|
||||
data:
|
||||
who: "{{ who if who is defined else 'everywhere' }}"
|
||||
call_interruption: 1
|
||||
call_server_maintenance: 1
|
||||
|
||||
welcome_home:
|
||||
alias: 'Welcome Home'
|
||||
sequence:
|
||||
|
@ -1873,6 +1873,15 @@ script:
|
||||
</p>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro server_maintenance() %}
|
||||
{{ [
|
||||
'The server will be going down for maintenance shortly. Prepare to activate caveman mode!',
|
||||
'We regret to inform you that Home Assistant will be unavailable for a short time. I will advise when it is back.',
|
||||
'The server in which I live, in your basement, will be going down shortly. I will let you know when I am alive again.',
|
||||
'The developer has decided that now is the time to perform surgery on my internals. Server going down. Godspeed, humans.'
|
||||
] | random }}
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
{# a macro that removes all newline characters, empty spaces, and returns formatted text. Also replaces all Underscores with Spaces #}
|
||||
{%- macro cleanup(data) -%}
|
||||
@ -1978,6 +1987,10 @@ script:
|
||||
{{ kallen_dressed_reminder() }}
|
||||
{% endif %}
|
||||
|
||||
{% if call_server_maintenance == 1 %}
|
||||
{{ server_maintenance() }}
|
||||
{% endif %}
|
||||
|
||||
{%- endmacro -%}
|
||||
|
||||
{{- cleanup(mother_of_all_macros()) -}}
|
Reference in New Issue
Block a user