Major audible notification overhual. It was hard to maintain. This will be easier. Maybe

This commit is contained in:
Jeffrey Stone
2020-12-02 22:55:11 -05:00
parent 84a5e84fa5
commit d5191c9ab8
24 changed files with 1537 additions and 1564 deletions

View File

@@ -106,3 +106,27 @@ script:
media_content_type: video/youtube
media_content_id: >
{{ media }}
sensor:
- platform: template
sensors:
room_audio:
friendly_name: "Room Audio"
unit_of_measurement: ''
value_template: >-
{%- if is_state('binary_sensor.theater_occupancy', 'on') and is_state('media_player.theater_tv', 'on') %}
theater
{% elif is_state('binary_sensor.kitchen_occupancy', 'on') %}
kitchen
{% elif is_state('binary_sensor.living_room_occupancy', 'on') and is_state('input_boolean.audible_notifications', 'on') %}
main
{% elif is_state('binary_sensor.croft_occupancy', 'on') %}
croft
{% elif is_state('binary_sensor.master_bedroom_occupancy', 'on') %}
master_bedroom
{% else %}
all_google
{%- endif %}
last_alexa:
value_template: >
{{ states.media_player | selectattr('attributes.last_called','eq',True) | map(attribute='entity_id') | first }}