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

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