You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/_components/alarm_control_panel.spc.markdown
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -18,3 +18,19 @@ The `spc` alarm control panel platform allows you to control your [Vanderbilt SP
18
18
19
19
The requirement is that you have setup your [SPC hub](/components/spc/).
20
20
21
+
The `changed_by` attribute enables one to be able to take different actions depending on who armed/disarmed the alarm in [automation](/getting-started/automation/).
22
+
23
+
```yaml
24
+
automation:
25
+
- alias: Alarm status changed
26
+
trigger:
27
+
- platform: state
28
+
entity_id: alarm_control_panel.alarm_1
29
+
action:
30
+
- service: notify.notify
31
+
data_template:
32
+
message: >
33
+
{% raw %}Alarm changed from {{ trigger.from_state.state }}
34
+
to {{ trigger.to_state.state }}
35
+
by {{ trigger.to_state.attributes.changed_by }}{% endraw %}
0 commit comments