Skip to content

Commit

Permalink
Lotsof updates...playing catchup
Browse files Browse the repository at this point in the history
  • Loading branch information
thejeffreystone committed Jun 16, 2023
1 parent 0afa69a commit 2c1366d
Show file tree
Hide file tree
Showing 30 changed files with 7,711 additions and 2,754 deletions.
1,079 changes: 643 additions & 436 deletions config/automations.yaml

Large diffs are not rendered by default.

457 changes: 457 additions & 0 deletions config/packages/announcements.yaml

Large diffs are not rendered by default.

450 changes: 450 additions & 0 deletions config/packages/appliances.yaml

Large diffs are not rendered by default.

188 changes: 164 additions & 24 deletions config/packages/audio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ script:
entity_id: input_boolean.disney_background
state: 'on'
- condition: state
entity_id: media_player.apple_tv
entity_id: media_player.home_theater
state: 'playing'
sequence:
- service: input_boolean.turn_off
Expand All @@ -232,7 +232,7 @@ script:
entity_id: input_boolean.disney_background
state: 'off'
- condition: state
entity_id: media_player.apple_tv
entity_id: media_player.home_theater
state: 'standy'
- condition: time
after: "07:00:00"
Expand All @@ -252,12 +252,10 @@ mqtt:
- name: "Presence Source"
state_topic: "house/presence/source"

sensor:
- platform: template
sensors:
google_speaker:
friendly_name: "Google Speaker"
value_template: >-
template:
- sensor:
- name: google_speaker
state: >-
{% set who = states('sensor.room_audio')%}
{% if who == 'kitchen' %}
Kitchen Display
Expand All @@ -280,9 +278,8 @@ sensor:
media_player.kitchen_display
{% endif %}
{% endif %}
spotify_speaker:
friendly_name: "Spotify Speaker"
value_template: >-
- name: spotify_speaker
state: >-
{% set who = states('sensor.room_audio')%}
{% if who == 'kitchen' %}
media_player.kitchen_display
Expand All @@ -305,11 +302,8 @@ sensor:
media_player.kitchen_display
{% endif %}
{% endif %}
- platform: template
sensors:
room_audio:
friendly_name: "Room Audio"
value_template: >-
- name: room_audio
state: >-
{% set sensor = 'main' %}
{% if is_state('input_boolean.audible_notifications', 'on') %}
{% if expand('group.occupancy') | selectattr('state', 'eq', 'on') | list | count >= 1 %}
Expand Down Expand Up @@ -355,7 +349,7 @@ sensor:
{% else %}
{{ states('sensor.room_presence') }}
{% endif %}
attribute_templates:
attributes:
presence_source: >
{% set sensor = 'NA' %}
{% if expand('group.occupancy') | selectattr('state', 'eq', 'on') | list | count >= 1 %}
Expand All @@ -381,10 +375,8 @@ sensor:
{% endif %}
{% endif %}
{% endif %}
alexa_audio:
friendly_name: "Alexa Audio"
value_template: >-
- name: alexa_audio
state: >-
{%- if is_state('sensor.last_alexa', 'media_player.living_room_echo') %}
living_room
{% elif is_state('sensor.last_alexa', 'media_player.kitchen_echo') %}
Expand All @@ -396,6 +388,154 @@ sensor:
{% else %}
main
{%- endif %}
last_alexa:
value_template: >
{{ expand('group.all_echos') | selectattr('attributes.last_called','eq',True) | map(attribute='entity_id') | first }}
- name: last_alexa
state: >
{{ expand('group.all_echos') | selectattr('attributes.last_called','eq',True) | map(attribute='entity_id') | first }}
# sensor:
# - platform: template
# sensors:
# google_speaker:
# friendly_name: "Google Speaker"
# value_template: >-
# {% set who = states('sensor.room_audio')%}
# {% if who == 'kitchen' %}
# Kitchen Display
# {% elif who == 'theater' %}
# Theater Speaker
# {% elif who == 'croft' %}
# Croft speaker
# {% elif who in ['skylar_bedroom', 'skylars_bedroom'] %}
# skylars bedroom speaker
# {% elif who == 'master_bedroom' %}
# Master Bedroom Speaker
# {% elif who in ['studio', 'studio_speaker', 'media_player.studio_speaker'] %}
# media_player.studio_speaker
# {% elif who == 'main' %}
# media_player.ha_blue
# {% else %}
# {% if states.input_boolean.audible_notifications.state == 'on' %}
# media_player.ha_blue
# {% else %}
# media_player.kitchen_display
# {% endif %}
# {% endif %}
# spotify_speaker:
# friendly_name: "Spotify Speaker"
# value_template: >-
# {% set who = states('sensor.room_audio')%}
# {% if who == 'kitchen' %}
# media_player.kitchen_display
# {% elif who == 'theater' %}
# media_player.theater_speaker
# {% elif who == 'croft' %}
# media_player.croft_speaker
# {% elif who in ['skylar_bedroom', 'skylars_bedroom'] %}
# media_player.skylars_bedroom_speaker
# {% elif who == 'master_bedroom' %}
# media_player.master_bedroom_speaker
# {% elif who in ['studio', 'studio_speaker', 'media_player.studio_speaker'] %}
# media_player.studio_speaker
# {% elif who == 'main' %}
# media_player.ha_blue
# {% else %}
# {% if states.input_boolean.audible_notifications.state == 'on' %}
# media_player.ha_blue
# {% else %}
# media_player.kitchen_display
# {% endif %}
# {% endif %}
# - platform: template
# sensors:
# room_audio:
# friendly_name: "Room Audio"
# value_template: >-
# {% set sensor = 'main' %}
# {% if is_state('input_boolean.audible_notifications', 'on') %}
# {% if expand('group.occupancy') | selectattr('state', 'eq', 'on') | list | count >= 1 %}
# {% set sensor = expand('group.occupancy') | selectattr('state', 'eq', 'on') | sort(attribute='last_changed') | last %}
# {% endif %}

# {% if sensor != 'main' and ((as_timestamp(now()) - (as_timestamp(sensor.last_changed)) | float ) % 3600) | round(0) <= states('input_number.presence_threshold') | float %}
# {% set sensor = expand('group.occupancy') | selectattr('state', 'eq', 'on') | sort(attribute='last_changed') | last %}
# {% elif sensor == 'main' and expand('group.room_presence')| rejectattr('state', 'in', ['not_home']) | sort(attribute='last_changed') | map(attribute='entity_id') | list | count > 0 %}
# {% set sensor = expand('group.room_presence')| rejectattr('state', 'in', ['not_home']) | sort(attribute='last_changed') | map(attribute='entity_id') | list | last %}
# {% set sensor = states(sensor) %}
# {% else %}
# {% if is_state('group.family', 'home') %}
# {% set sensor = states('sensor.room_presence') %}
# {% endif %}
# {% endif %}
# {% else %}

# {% if sensor == 'main' and expand('group.room_presence')| rejectattr('state', 'in', ['not_home']) | sort(attribute='last_changed') | map(attribute='entity_id') | list | count > 0 %}
# {% set sensor = expand('group.room_presence')| rejectattr('state', 'in', ['not_home']) | sort(attribute='last_changed') | map(attribute='entity_id') | list | last %}
# {% set sensor = states(sensor) %}
# {% else %}
# {% set sensor = expand('group.occupancy_night') | sort(attribute='last_changed') | last %}
# {% endif %}
# {% endif %}

# {% if sensor.name in ['Master Bedroom Motion'] or sensor in ['master_bedroom','bedrooms'] %}
# master_bedroom
# {% elif sensor.name in ['Bar Motion','Pantry Motion', 'Kitchen Motion'] or sensor == 'kitchen' %}
# kitchen
# {% elif sensor.name in ['Living Room Motion','main', 'Stairs Motion Top'] or sensor == 'living_room' %}
# living_room
# {% elif sensor.name in ['Skylars Room Motion' ] %}
# skylar_bedroom
# {% elif sensor.name in ['Studio Motion' ] or sensor == 'studio' %}
# studio
# {% elif sensor.name in ['Pottery Studio Motion', 'Dungeon Motion' ] %}
# pottery_studio
# {% elif sensor.name in ['Theater Motion', 'Stairs Motion Bottom' ] or is_state('media_player.theater_tv', 'on') or sensor == 'theater' %}
# theater
# {% elif sensor.name in ['Exercise Motion' ] %}
# exercise_room
# {% else %}
# {{ states('sensor.room_presence') }}
# {% endif %}
# attribute_templates:
# presence_source: >
# {% set sensor = 'NA' %}
# {% if expand('group.occupancy') | selectattr('state', 'eq', 'on') | list | count >= 1 %}
# {% set sensor = expand('group.occupancy') | selectattr('state', 'eq', 'on') | sort(attribute='last_changed') | last %}
# {% endif %}
# {% if sensor != 'NA' and ((as_timestamp(now()) - (as_timestamp(sensor.last_changed)) | float ) % 3600) | round(0) <= 120 %}
# motion sensor
# {% else %}
# {% set sensor = expand('group.room_presence')| rejectattr('state', 'in', ['not_home']) | sort(attribute='last_changed') | map(attribute='entity_id') | list | last %}
# {% if states(sensor) == states('sensor.room_presence') %}
# {% if 'jeffs' in sensor %}
# jeff
# {% elif 'kats' in sensor %}
# kat
# {% else %}
# {{ states('sensor.presence_source') }}
# {% endif %}
# {% else %}
# {% if is_state('group.family', 'home') %}
# {{ states('sensor.presence_source') }}
# {% else %}
# none
# {% endif %}
# {% endif %}
# {% endif %}

# alexa_audio:
# friendly_name: "Alexa Audio"
# value_template: >-
# {%- if is_state('sensor.last_alexa', 'media_player.living_room_echo') %}
# living_room
# {% elif is_state('sensor.last_alexa', 'media_player.kitchen_echo') %}
# kitchen
# {% elif is_state('sensor.last_alexa', 'media_player.skylar_s_bedroom') %}
# skylar_bedroom
# {% elif is_state('sensor.last_alexa', 'media_player.dads_desk') %}
# master_bedroom
# {% else %}
# main
# {%- endif %}
# last_alexa:
# value_template: >
# {{ expand('group.all_echos') | selectattr('attributes.last_called','eq',True) | map(attribute='entity_id') | first }}
6 changes: 3 additions & 3 deletions config/packages/camera.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ camera:
- platform: ffmpeg
name: "Backyard Ezviz"
input: !secret ezviz_c8c
# - platform: ffmpeg
# name: "Printer Cam"
# input: !secret printer_cam
- platform: ffmpeg
name: "Printer Cam"
input: !secret printer_cam
ffmpeg:
ffmpeg_bin: /usr/bin/ffmpeg

Expand Down
Loading

0 comments on commit 2c1366d

Please sign in to comment.