mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-07 17:34:42 +00:00
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
automation:
|
|
- alias: Notification · Phone battery low
|
|
trigger:
|
|
platform: template
|
|
value_template: "{{ states('sensor.carbon_battery_level') | int < 10 }}"
|
|
condition:
|
|
condition: state
|
|
entity_id: sensor.carbon_battery_state
|
|
state: "Not Charging"
|
|
action:
|
|
service: script.say
|
|
data_template:
|
|
title: "❕*Notification Module*"
|
|
message: >-
|
|
|
|
{{
|
|
[
|
|
"Hey, just wanted to let you know your phone needs charging!",
|
|
"Hey, your phone is running low on battery, put it on the charger!"
|
|
] | random
|
|
}}
|
|
|
|
- alias: Notification · Door opened
|
|
trigger:
|
|
platform: state
|
|
entity_id: binary_sensor.front_door_on_off
|
|
to: "on"
|
|
for:
|
|
minutes: 2
|
|
action:
|
|
service: script.say
|
|
data_template:
|
|
title: "❕*Notification Module*"
|
|
message: >-
|
|
|
|
{{
|
|
[
|
|
"Hey, the front door is opened. Are you home?!",
|
|
"Hey, the front door has been opened for 2 minutes!"
|
|
] | random
|
|
}}
|