clean up & fixes
This commit is contained in:
parent
d534709793
commit
f9b3225288
|
@ -2,16 +2,6 @@ title: Multi Room Audio & TTS
|
||||||
icon: mdi:television
|
icon: mdi:television
|
||||||
cards:
|
cards:
|
||||||
|
|
||||||
- type: entities
|
|
||||||
title: Raspberry Pi Scripts
|
|
||||||
show_header_toggle: false
|
|
||||||
entities:
|
|
||||||
- script.query_disk_info
|
|
||||||
- script.query_wifi_info
|
|
||||||
- script.restart_all_raspberrypis
|
|
||||||
- script.restart_all_snapclients
|
|
||||||
- script.shutdown_all_raspberrypis
|
|
||||||
|
|
||||||
- type: entities
|
- type: entities
|
||||||
title: Text To Speech
|
title: Text To Speech
|
||||||
show_header_toggle: false
|
show_header_toggle: false
|
||||||
|
|
|
@ -1,46 +1,18 @@
|
||||||
>
|
>
|
||||||
{% macro weather_update() -%}
|
{% macro door_status() -%}
|
||||||
Outside temperature is {{ states('sensor.dark_sky_apparent_temperature') | round(0) }} degrees.
|
{%- for x in states if x.domain == 'binary_sensor' and 'door_window_sensor' in x.entity_id and x.state == "on" %}
|
||||||
{%- endmacro -%}
|
{{ x.name }} is open.
|
||||||
|
{%- endfor %}
|
||||||
|
{%- endmacro %}
|
||||||
|
|
||||||
{%- macro uv_levels() -%}
|
{% macro motion_sensor_status() -%}
|
||||||
{%- set uv = states('sensor.pws_uv') | int -%}
|
{% for x in states if x.domain == 'binary_sensor' and 'motion_sensor' in x.entity_id and x.state == "on" %}
|
||||||
{%- if uv >= 6 and uv <= 7 -%}
|
{{ x.name }} motion detected
|
||||||
Current UV index is high. Please be careful outdoors.
|
{%- endfor %}
|
||||||
{%- elif uv >= 8 and uv <= 10 -%}
|
{%- endmacro %}
|
||||||
Current UV index is very high. It is not advised to go out.
|
|
||||||
{%- elif uv >= 11 -%}
|
|
||||||
Current UV index is extremely high. It is highly advised to stay indoors.
|
|
||||||
{%- else -%}
|
|
||||||
Good UV levels.
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endmacro -%}
|
|
||||||
|
|
||||||
{%- macro USPS() -%}
|
{% macro alarm_status() -%}
|
||||||
{%- if states('sensor.usps_mail') | int > 0 -%}
|
Your home security is set to: {{ states('alarm_control_panel.home') | upper }}
|
||||||
USPS is going to deliver {{ states('sensor.usps_mail') }} mails today.
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endmacro -%}
|
|
||||||
|
|
||||||
{%- macro alert_battery_levels() %}
|
|
||||||
{% for item in states if 'battery_level' in item.attributes and item.attributes.battery_level | int > 0 and item.attributes.battery_level | float <= 10.0 -%}{{- item.attributes.friendly_name ~ " battery is less than 10 percent" -}}
|
|
||||||
{%- if loop.first %}, {% elif loop.last %}, {% else %}, {% endif -%}
|
|
||||||
{%- endfor -%}
|
|
||||||
{%- endmacro -%}
|
|
||||||
|
|
||||||
{%- macro tesla_status() -%}
|
|
||||||
{%- if states("sensor.tesla_model_3_range_sensor") != "unknown" -%}
|
|
||||||
Your Tesla car battery is at {{ states('sensor.tesla_model_3_battery_sensor') }} percent ({{ (states('sensor.tesla_model_3_range_sensor') | int) | round(0) }} miles).
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endmacro -%}
|
|
||||||
|
|
||||||
{%- macro humidity_status() -%}
|
|
||||||
Home humidity is {{ states('sensor.dining_room_thermostat_humidity') }} percent.
|
|
||||||
{%- endmacro -%}
|
|
||||||
|
|
||||||
{%- macro alarm_status() -%}
|
|
||||||
Your home is {{ "SECURED!" if states('alarm_control_panel.home') == "armed_away" or states('alarm_control_panel.home') == "armed_home" else "UNSECURED!" -}}
|
|
||||||
. Your Home Away Status is set to {{ states('input_boolean.home_mode_away') |upper }}
|
|
||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
|
|
||||||
{%- macro single_car_garage_door_status() -%}
|
{%- macro single_car_garage_door_status() -%}
|
||||||
|
@ -87,12 +59,11 @@
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
|
|
||||||
{%- macro mother_of_all_macros() -%}
|
{% macro mother_of_all_macros() -%}
|
||||||
{{ alarm_status() }}
|
{{ alarm_status() }}
|
||||||
|
{{ door_status() }}
|
||||||
|
{{ motion_sensor_status() }}
|
||||||
{{ garage_status() }}
|
{{ garage_status() }}
|
||||||
{{ weather_update() }}
|
|
||||||
{{ humidity_status() }}
|
|
||||||
{{ uv_levels() }}
|
|
||||||
{{ light_switch_status() }}
|
{{ light_switch_status() }}
|
||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue