mirror of
https://github.com/thejeffreystone/home-assistant-configuration.git
synced 2025-08-29 01:03:14 +00:00
More Tweaks to audible notifications...think we are good now
This commit is contained in:
@@ -113,29 +113,31 @@ sensor:
|
||||
room_audio:
|
||||
friendly_name: "Room Audio"
|
||||
value_template: >-
|
||||
{% set sensor_count = expand('group.occupancy') | selectattr('state', 'eq', 'on') | list | count %}
|
||||
{% if sensor_count >= 1 %}
|
||||
{% for sensor in expand('group.occupancy') %}
|
||||
{% if as_timestamp(sensor.last_changed) == as_timestamp(expand('group.occupancy') | selectattr('state', 'eq', 'on') | map(attribute='last_changed') | max) %}
|
||||
{%- if is_state('media_player.theater_tv', 'on') %}
|
||||
theater
|
||||
{% elif sensor.name == 'Kitchen Occupancy' %}
|
||||
kitchen
|
||||
{% elif sensor.name == 'Living Room Occupancy' and is_state('input_boolean.audible_notifications', 'on') %}
|
||||
main
|
||||
{% elif sensor.name == 'Living Room Occupancy' and is_state('input_boolean.audible_notifications', 'off') %}
|
||||
kitchen
|
||||
{% elif sensor.name == 'Croft Occupancy' %}
|
||||
croft
|
||||
{% elif sensor.name == 'Master Bedroom Occupancy' %}
|
||||
master_bedroom
|
||||
{% else %}
|
||||
all_google
|
||||
{%- endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{%- if is_state('media_player.theater_tv', 'on') %}
|
||||
theater
|
||||
{% else %}
|
||||
main
|
||||
{% set sensor_count = expand('group.occupancy') | selectattr('state', 'eq', 'on') | list | count %}
|
||||
{% if sensor_count >= 1 %}
|
||||
{% for sensor in expand('group.occupancy') %}
|
||||
{% if as_timestamp(sensor.last_changed) == as_timestamp(expand('group.occupancy') | selectattr('state', 'eq', 'on') | map(attribute='last_changed') | max) %}
|
||||
{% if is_state('input_boolean.audible_notifications', 'on') %}
|
||||
{% if sensor.name == 'Kitchen Motion Occupancy' %}
|
||||
kitchen
|
||||
{% elif sensor.name == 'Master Bedroom Occupancy' %}
|
||||
master_bedroom
|
||||
{% else %}
|
||||
main
|
||||
{%- endif %}
|
||||
{% else %}
|
||||
{% if sensor.name == 'Croft Occupancy' %}
|
||||
croft
|
||||
{% else %}
|
||||
kitchen
|
||||
{%- endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
alexa_audio:
|
||||
friendly_name: "Alexa Audio"
|
||||
|
Reference in New Issue
Block a user