Repository navigation
Expand file tree
/
Copy pathsensors.yaml
More file actions
57 lines (54 loc) · 1.73 KB
/
Copy pathsensors.yaml
File metadata and controls
57 lines (54 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
- id: "16a50316-0745-4505-9418-c2e782553b85"
alias: 'Garage Open Notification'
initial_state: true
trigger:
platform: state
entity_id: binary_sensor.garage_door_opened
to: 'on'
for:
minutes: 5
action:
- service: notify.telegram_notify_greg
data:
message: 'The Garage Door has been open for more than 5 minutes'
- service: notify.telegram_notify_Sara
data:
message: 'The Garage Door has been open for more than 5 minutes'
- id: "556a89bb-35fc-4d1d-b05f-24838130ba27"
alias: "NUT UPS Error"
initial_state: true
trigger:
platform: state
entity_id: sensor.ups_status
to: unavailable
for:
minutes: 5
action:
- service: notify.telegram_notify_greg
data:
message: 'The UPS is in an unknown state, you may need to reboot the server.'
- id: "4de6626d-f937-48b1-9f2d-8ad7ce4c59e5"
alias: "Reload Speedtest"
initial_state: true
trigger:
- platform: template
value_template: >-
{% set last_updated = as_timestamp(states.sensor.speedtest_download.last_updated) %}
{% set is_unavailable = states.sensor.speedtest_download.last_updated == 'unavailable' %}
{% if (as_timestamp(now()) - last_updated) > 3900 or is_unavailable == 'True'%}
true
{% else %}
false
{% endif %}
action:
- service: notify.telegram_notify_greg
data:
message: >-
Speedtest was last loaded {{relative_time(states.sensor.speedtest_download.last_updated) }}
ago. It is being reloaded.
- delay: "00:00:03"
- service: homeassistant.reload_config_entry
data:
entry_id: 5381213a762e2b7528453d58d26ba12c
target:
entity_id: sensor.speedtest_download