mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-08-20 20:16:52 +00:00
Created new Locator automation to trigger 'where is everyone automation'. #1472
This commit is contained in:
24
config/packages/minecraft.yaml
Executable file
24
config/packages/minecraft.yaml
Executable 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'
|
Reference in New Issue
Block a user