Created new Locator automation to trigger 'where is everyone automation'. #1472

This commit is contained in:
CCOSTAN 2025-05-26 21:09:46 +00:00
parent 9b1b76e877
commit 4776b9ddf3
13 changed files with 169 additions and 91 deletions

View File

@ -1 +1 @@
2025.3.3
2025.5.3

View File

@ -0,0 +1,25 @@
#-------------------------------------------
# Locator Automation
# Description: Announces the location of all family members when triggered
#
# Features:
# - Triggered by input_boolean.locator (for Alexa integration)
# - Uses speech_engine script to announce where everyone is
# - Designed for use with Alexa ("Alexa, turn on locator")
#
# Follow me on https://www.vcloudinfo.com/click-here
#-------------------------------------------
- alias: 'Locator'
id: locator-announcement-001
mode: single
trigger:
- platform: state
entity_id: input_boolean.locator
to: 'on'
action:
- service: script.speech_engine
data:
call_no_announcement: 1
- service: input_boolean.turn_off
data:
entity_id: input_boolean.locator

View File

@ -35,7 +35,15 @@
- wait_template: >-
{{ states.sun.sun.state == 'above_horizon' }}
- service: homeassistant.turn_on
entity_id: switch.alarm_panel_1_motion_detection
entity_id:
- switch.alarm_panel_1_motion_detection
- switch.office_lamp_switch_socket
- service: number.set_value
target:
entity_id: number.alarm_panel_1_screen_brightness
data:
value: 100
- service: button.press
entity_id: button.alarm_panel_1_restart_browser
- service: homeassistant.turn_off

View File

@ -42,3 +42,31 @@
- service: switch.turn_off
data:
entity_id: "{{ trigger.entity_id }}"
- alias: 'Bedroom Screensaver Watchdog'
id: Bedroom-Screensaver-Watchdog-automation
trigger:
- platform: state
entity_id: binary_sensor.sleepnumber_carlo_carlo_is_in_bed
to: 'on'
- platform: state
entity_id: binary_sensor.sleepnumber_carlo_stacey_is_in_bed
to: 'on'
- platform: state
entity_id: switch.alarm_panel_1_screensaver
to: 'off'
condition:
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.sleepnumber_carlo_carlo_is_in_bed
state: 'on'
- condition: state
entity_id: binary_sensor.sleepnumber_carlo_stacey_is_in_bed
state: 'on'
action:
- service: switch.turn_on
entity_id: switch.alarm_panel_1_screensaver

View File

@ -26,4 +26,9 @@
- switch.lr_amp
- light.kitchen_lights
- switch.alarm_panel_1_motion_detection
- service: number.set_value
target:
entity_id: number.alarm_panel_1_screen_brightness
data:
value: 100

View File

@ -12,6 +12,16 @@
- platform: state
entity_id: group.family
to: 'not_home'
- platform: sun
event: sunrise
offset: '-02:00:00'
- platform: sun
event: sunset
offset: '+00:30:00'
- platform: time
at:
- '03:00:00'
- '12:00:00'
condition:
- condition: state

View File

@ -53,6 +53,11 @@
- group.master_bathroom_accents
- switch.alarm_panel_1_motion_detection
- service: script.interior_off
- service: number.set_value
target:
entity_id: number.alarm_panel_1_screen_brightness
data:
value: 0
- alias: 'Bed Presence AMP Trigger'
@ -86,6 +91,11 @@
- group.master_bathroom_accents
- group.landscaping
- switch.alarm_panel_1_motion_detection
- service: number.set_value
target:
entity_id: number.alarm_panel_1_screen_brightness
data:
value: 0
default:
- service: homeassistant.turn_on
target:

View File

@ -30,3 +30,7 @@ color_tornado:
guard_dog:
name: Guard Dog
initial: off
locator:
name: Locator
icon: mdi:map-marker-account
initial: off

24
config/packages/minecraft.yaml Executable file
View File

@ -0,0 +1,24 @@
#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# Minecraft related stuff
#-------------------------------------------
automation:
- alias: Someone on the MC server!
id: e7cc50d1-2374-4923-8e0c-2a59ff593cf8
trigger:
- platform: state
entity_id: sensor.minecraft_players_online
action:
- service: script.notify_engine
data:
value1: >
{% if states.sensor.minecraft_players_online.state|int > 0 %}
{{ states.sensor.minecraft_players_online.state }} player(s) connected to Minecraft server
{% else %}
All players disconnected from Minecraft server
{% endif %}
title: "Minecraft Server Status"
who: 'carlo'
group: 'information'

View File

@ -1,63 +0,0 @@
#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# Neato Support for D7 Connected Botvac - control my [Neato Vacuum](http://amzn.to/2kqnnqu) with Home Assistant.
#-------------------------------------------
# homeassistant:
# customize_glob:
# "*.*_sleep_hours":
# unit_of_measurement: hours
# icon: mdi:sleep
#
#
#-------------------------------------------
sensor:
platform: minecraft
name: Bear Stone
server: !secret minecraft
#-------------------------------------------
group:
Minecraft:
entities:
- sensor.bear_stone
##############################################################################
### Automations - Detect when things are not right. Like any Good Watchdog.
##############################################################################
#automation:
#Tweets pushed out to X.
automation:
- alias: Someone on the MC server!
id: e7cc50d1-2374-4923-8e0c-2a59ff593cf8
trigger:
- platform: state
entity_id: sensor.bear_stone
action:
- service: light.turn_on
entity_id: light.justin_go
data:
color_name: >
{% if states.sensor.bear_stone.state|int == 1 %}
gold
{% elif states.sensor.bear_stone.state|int == 2 %}
green
{% elif states.sensor.bear_stone.state|int == 3 %}
blue
{% else %}
red
{% endif %}
- service: >
{% if states.sensor.bear_stone.state|int > 0 %}
light.turn_on
{% else %}
light.turn_off
{% endif %}
entity_id: light.justin_go
- service: light.turn_on
entity_id:
- light.justin_go
data:
flash: short

View File

@ -55,8 +55,6 @@ automation:
entity_id: all
data:
flash: long
# - service: switch.turn_off
# entity_id: all
- service: light.turn_off
entity_id: all

View File

@ -48,10 +48,18 @@ automation:
value_template: "{{ states('sensor.l10s_vacuum_error') not in ['no_error', 'unavailable'] }}"
action:
- service: script.notify_engine
data:
title: 'Help vacuum'
value1: "{{ states('sensor.l10s_vacuum_error') }} - {{states('sensor.l10s_vacuum_current_room')}}"
who: 'family'
ios_category: 'camera'
camera_entity: 'camera.l10s_vacuum_map'
content_type: 'jpeg'
group: 'information'
- wait_template: "{{ is_state('group.bed', 'off') }}"
timeout:
seconds: 600
continue_on_timeout: true
- wait_template: "{{ is_state('group.family', 'home') }}"
- delay: 00:03:00
@ -61,20 +69,9 @@ automation:
- service: script.speech_engine
data:
value1: >
{% set error_description = state_attr('sensor.l10s_vacuum_error', 'description') %}
{{ "Vacuum is complaining: " ~ error_description ~ " [ask Residents to help]" }}
{{ "Vacuum error: " ~ states('sensor.l10s_vacuum_error') ~ " [ask Residents to help]" }}
Currently in {{states('sensor.l10s_vacuum_current_room')}}"
- service: script.notify_engine
data:
title: 'Help vacuum'
value1: "{{ state_attr('sensor.l10s_vacuum_error', 'description') }} - {{states('sensor.l10s_vacuum_current_room')}}"
who: 'family'
ios_category: 'camera'
camera_entity: 'camera.l10s_vacuum_map'
content_type: 'jpeg'
group: 'information'
- delay: 00:01:00
- service: vacuum.locate
entity_id: vacuum.l10s_vacuum

View File

@ -238,16 +238,48 @@
{% set year = current_date.strftime('%Y') %}
{% set time = current_date.strftime('%I:%M %p') %}
Current date time: {{ month }} {{ day }}, {{ year }} {{ time }}
Residents: Location
- Carlo (Dad): {{ states('person.carlo') }} at {{ states('sensor.carlo_place') if states('sensor.carlo_place') != unknown else 'Away' }}
- Stacey (Mom): {{ states('person.stacey')}} at {{ states('sensor.stacey_place') if states('sensor.stacey_place') != unknown else 'Away' }}
- Justin (Son): {{ states('person.justin') }} at {{ states('sensor.justin_place') if states('sensor.justin_place') != unknown else 'Away' }}
- Paige (Daughter): {{ states('person.paige') }} at {{ states('sensor.paige_place') if states('sensor.paige_place') != unknown else 'Away' }}
and our cat Molly: Always home.
- Location Context: When Paige is at FSU, you can say she is at her Dorm. When Justin is at Stefanos, you can say he is at work.
Previous broadcast: "{{ state_attr('sensor.openai_response', 'response') }}"
[Announce where everyone is if they are not at home. Avoid repeating information from the previous broadcast if it was within the hour]
Residents: Location
- Carlo (Dad): {{ states('person.carlo') }} at
{%- if states('sensor.carlo_place') != 'unknown' %}
{{ states('sensor.carlo_place') }}
{% else -%}
Away
{% endif -%}
{%- if states('person.carlo') != 'home' %}
(Direction of travel: {{ state_attr('sensor.carlo_place', 'direction_of_travel') }})
{% endif -%}
- Stacey (Mom): {{ states('person.stacey') }} at
{%- if states('sensor.stacey_place') != 'unknown' %}
{{ states('sensor.stacey_place') }}
{% else -%}
Away
{% endif -%}
{%- if states('person.stacey') != 'home' %}
(Direction of travel: {{ state_attr('sensor.stacey_place', 'direction_of_travel') }})
{% endif -%}
- Justin (Son): {{ states('person.justin') }} at
{%- if states('sensor.justin_place') != 'unknown' %}
{{ states('sensor.justin_place') }}
{% else -%}
Away
{% endif -%}
{%- if states('person.justin') != 'home' %}
(Direction of travel: {{ state_attr('sensor.justin_place', 'direction_of_travel') }})
{% endif -%}
- Paige (Daughter): {{ states('person.paige') }} at
{%- if states('sensor.paige_place') != 'unknown' %}
{{ states('sensor.paige_place') }}
{% else -%}
Away
{% endif -%}
{%- if states('person.paige') != 'home' %}
(Direction of travel: {{ state_attr('sensor.paige_place', 'direction_of_travel') }})
{% endif -%}
and our cat Molly: Always home.
Previous broadcast: "{{ state_attr('sensor.openai_response', 'response') }}"
[Mention where each person is and approximately how long they have been there, using conversational and friendly language or if they are not at home or just arrived. Avoid repeating information from the previous broadcast if it was within the hour]
New Information:
{% if call_no_announcement != 1 %}
{% if now().strftime('%H')|int(9999)< 12 and now().strftime('%H')|int(9999)> 6 %}