Minor tweaks
This commit is contained in:
@ -678,7 +678,7 @@ sensor:
|
|||||||
] | random }}
|
] | random }}
|
||||||
{% elif is_state('sensor.clothing_forecast', 'Hot') and is_state('sensor.current_forecast', 'sunny') %}
|
{% elif is_state('sensor.clothing_forecast', 'Hot') and is_state('sensor.current_forecast', 'sunny') %}
|
||||||
It is going to be
|
It is going to be
|
||||||
{{ [ 'so hot you\'ll sweat your balls off',
|
{{ [ 'so hot you will sweat your balls off',
|
||||||
'hotter than the sun ',
|
'hotter than the sun ',
|
||||||
'hotter than the inside of a volcano ',
|
'hotter than the inside of a volcano ',
|
||||||
] | random }}
|
] | random }}
|
||||||
@ -697,14 +697,14 @@ sensor:
|
|||||||
today. So I suggest wearing shorts.
|
today. So I suggest wearing shorts.
|
||||||
{% elif is_state('sensor.clothing_forecast', 'Hot') %}
|
{% elif is_state('sensor.clothing_forecast', 'Hot') %}
|
||||||
It is going to be
|
It is going to be
|
||||||
{{ [ 'so hot you\'ll sweat your balls off',
|
{{ [ 'so hot you will sweat your balls off',
|
||||||
'hotter than the sun ',
|
'hotter than the sun ',
|
||||||
'hotter than the inside of a volcano ',
|
'hotter than the inside of a volcano ',
|
||||||
'hotter than hell itself ',
|
'hotter than hell itself ',
|
||||||
] | random }}
|
] | random }}
|
||||||
today. So I suggest wearing shorts.
|
today. So I suggest wearing shorts.
|
||||||
{% else %}
|
{% else %}
|
||||||
It is going to be {{ states.sensor.clothing_forecast.state }} today so I suggest wearing shorts.
|
It is going to be {{ states('sensor.clothing_forecast') }} today so I suggest wearing shorts.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% set high = state_attr('sensor.current_forecast','high_temp') %}
|
{% set high = state_attr('sensor.current_forecast','high_temp') %}
|
||||||
{% if high > 85 %}
|
{% if high > 85 %}
|
||||||
@ -741,7 +741,7 @@ sensor:
|
|||||||
] | random }}
|
] | random }}
|
||||||
{% elif is_state('sensor.clothing_forecast', 'Hot') and is_state('weather.iron_nerd_weather_station','sunny') %}
|
{% elif is_state('sensor.clothing_forecast', 'Hot') and is_state('weather.iron_nerd_weather_station','sunny') %}
|
||||||
It is
|
It is
|
||||||
{{ [ 'so hot you\'ll sweat your balls off',
|
{{ [ 'so hot you will sweat your balls off',
|
||||||
'hotter than the sun ',
|
'hotter than the sun ',
|
||||||
'hotter than the inside of a volcano ',
|
'hotter than the inside of a volcano ',
|
||||||
] | random }}
|
] | random }}
|
||||||
@ -760,14 +760,14 @@ sensor:
|
|||||||
outside. So I suggest wearing shorts.
|
outside. So I suggest wearing shorts.
|
||||||
{% elif is_state('sensor.clothing_forecast', 'Hot') %}
|
{% elif is_state('sensor.clothing_forecast', 'Hot') %}
|
||||||
It is
|
It is
|
||||||
{{ [ 'so hot you\'ll sweat your balls off',
|
{{ [ 'so hot you will sweat your balls off',
|
||||||
'hotter than the sun ',
|
'hotter than the sun ',
|
||||||
'hotter than the inside of a volcano ',
|
'hotter than the inside of a volcano ',
|
||||||
'hotter than hell itself ',
|
'hotter than hell itself ',
|
||||||
] | random }}
|
] | random }}
|
||||||
outside. So I suggest wearing shorts.
|
outside. So I suggest wearing shorts.
|
||||||
{% else %}
|
{% else %}
|
||||||
It is {{ states.sensor.clothing_forecast.state }} right now so I suggest wearing shorts.
|
It is {{ states('sensor.clothing_forecast') }} right now so I suggest wearing shorts.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% set heatindex = states('sensor.pirateweather_apparent_temperature') | float | round %}
|
{% set heatindex = states('sensor.pirateweather_apparent_temperature') | float | round %}
|
||||||
{% if heatindex > 90 %}
|
{% if heatindex > 90 %}
|
||||||
@ -776,18 +776,18 @@ sensor:
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}
|
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}
|
||||||
{%- macro cleanup(data) -%}
|
{%- macro cleanup(data) -%}
|
||||||
{%- for item in data.split("\n") if item | trim != "" -%}
|
{%- for item in data.split("\n") if item | trim != "" -%}
|
||||||
{{ item | trim }} {% endfor -%}
|
{{ item | trim }} {% endfor -%}
|
||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
|
|
||||||
{# a macro to call all macros :) #}
|
{# a macro to call all macros :) #}
|
||||||
{%- macro mother_of_all_macros() -%}
|
{%- macro mother_of_all_macros() -%}
|
||||||
{{ getReport() }}
|
{{ getReport() }}
|
||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
|
|
||||||
{# Call the macro #}
|
{# Call the macro #}
|
||||||
{{- cleanup(mother_of_all_macros()) -}}
|
{{- cleanup(mother_of_all_macros()) -}}
|
||||||
nws_current_visibility:
|
nws_current_visibility:
|
||||||
friendly_name: "Current Visibility"
|
friendly_name: "Current Visibility"
|
||||||
value_template: "{{ ((state_attr('weather.iron_nerd_weather_station','visibility') | int) * 0.621371) | round }}"
|
value_template: "{{ ((state_attr('weather.iron_nerd_weather_station','visibility') | int) * 0.621371) | round }}"
|
||||||
@ -820,7 +820,7 @@ input_boolean:
|
|||||||
icon: mdi:snowflake-alert
|
icon: mdi:snowflake-alert
|
||||||
weather_alert_texts:
|
weather_alert_texts:
|
||||||
name: Weather Alert Texts
|
name: Weather Alert Texts
|
||||||
icon: mdi:telegram
|
icon: mdi:message-processing
|
||||||
lightning_warning:
|
lightning_warning:
|
||||||
name: Lightning Warning
|
name: Lightning Warning
|
||||||
icon: mdi:flash-alert
|
icon: mdi:flash-alert
|
||||||
|
Reference in New Issue
Block a user