Skip to content

Commit 7eb8d7f

Browse files
committed
Add doc for new changed_by attr.
1 parent 789ba6b commit 7eb8d7f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

source/_components/alarm_control_panel.spc.markdown

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,19 @@ The `spc` alarm control panel platform allows you to control your [Vanderbilt SP
1818

1919
The requirement is that you have setup your [SPC hub](/components/spc/).
2020

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 %}
36+
```

0 commit comments

Comments
 (0)