Skip to content

Commit 0b4218f

Browse files
committed
Replace platform: state with trigger: state
1 parent 92af0c3 commit 0b4218f

12 files changed

+37
-37
lines changed

automations/adaptive_lighting.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#- from github.com/basnijholt/home-assistant-config
1111
- alias: "Adaptive lighting: turn on and off switches"
1212
triggers:
13-
- platform: state
13+
- trigger: state
1414
entity_id: input_select.sleep_mode
1515
- platform: homeassistant
1616
event: start # in case the states aren't properly restored

automations/climate.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
triggers:
141141
- platform: time_pattern
142142
minutes: "/10"
143-
- platform: state
143+
- trigger: state
144144
entity_id: binary_sensor.activity_in_guest_room
145145
to: "off"
146146
conditions:

automations/frontend.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232

3333
- alias: "Frontend: change theme"
3434
triggers:
35-
- platform: state
35+
- trigger: state
3636
entity_id: input_select.theme
37-
- platform: state
37+
- trigger: state
3838
entity_id: input_boolean.dark_mode
39-
- platform: state
39+
- trigger: state
4040
entity_id: input_boolean.theme_alternative
4141
- platform: homeassistant
4242
event: start

automations/leaving.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
- alias: "Leaving: automatically turn off everything"
1313
initial_state: "on"
1414
triggers:
15-
- platform: state
15+
- trigger: state
1616
entity_id: binary_sensor.someone_in_the_house_in_last_hour
1717
from: "on"
1818
to: "off"
@@ -40,10 +40,10 @@
4040
- alias: "Leaving: ask to turn off everything"
4141
initial_state: "on"
4242
triggers:
43-
- platform: state
43+
- trigger: state
4444
entity_id: person.bas
4545
from: "home"
46-
- platform: state
46+
- trigger: state
4747
entity_id: person.marcella
4848
from: "home"
4949
conditions:

automations/light.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@
3838

3939
- alias: "Light: turn off living room"
4040
triggers:
41-
- platform: state
41+
- trigger: state
4242
entity_id: binary_sensor.activity_in_living_room
4343
to: "off"
44-
- platform: state
44+
- trigger: state
4545
entity_id: input_select.sleep_mode
4646
from: total
4747
conditions:
@@ -54,12 +54,12 @@
5454

5555
- alias: "Light: turn on Chrismas tree"
5656
triggers:
57-
- platform: state
57+
- trigger: state
5858
entity_id: input_select.sleep_mode
5959
to:
6060
- "off"
6161
- "half"
62-
- platform: state
62+
- trigger: state
6363
entity_id: binary_sensor.someone_in_the_house_in_last_hour
6464
to: "on"
6565
conditions:
@@ -72,10 +72,10 @@
7272

7373
- alias: "Light: turn off Chrismas tree"
7474
triggers:
75-
- platform: state
75+
- trigger: state
7676
entity_id: input_select.sleep_mode
7777
to: "total"
78-
- platform: state
78+
- trigger: state
7979
entity_id: binary_sensor.someone_in_the_house_in_last_hour
8080
to: "off"
8181
actions:
@@ -201,11 +201,11 @@
201201
- alias: "Light: turn on hall"
202202
mode: parallel
203203
triggers:
204-
- platform: state
204+
- trigger: state
205205
entity_id: binary_sensor.activity_in_hall
206206
from: "off"
207207
to: "on"
208-
- platform: state
208+
- trigger: state
209209
entity_id: binary_sensor.openclose_front_door
210210
from: "off"
211211
to: "on"
@@ -304,7 +304,7 @@
304304
- alias: "Light: turn off bedroom lights auto switch"
305305
mode: parallel
306306
triggers:
307-
- platform: state
307+
- trigger: state
308308
entity_id: light.bedroom_lights
309309
to: "off"
310310
- platform: event
@@ -383,13 +383,13 @@
383383

384384
- alias: "Light: turn on utility room / garage outside"
385385
triggers:
386-
- platform: state
386+
- trigger: state
387387
to: "on"
388388
entity_id: binary_sensor.activity_in_utility_room
389-
- platform: state
389+
- trigger: state
390390
to: "on"
391391
entity_id: binary_sensor.activity_outside_front_door
392-
- platform: state
392+
- trigger: state
393393
to: "on"
394394
entity_id: binary_sensor.activity_outside_garage
395395
actions:
@@ -412,13 +412,13 @@
412412

413413
- alias: "Light: turn off utility room / garage outside"
414414
triggers:
415-
- platform: state
415+
- trigger: state
416416
to: "off"
417417
entity_id: binary_sensor.activity_in_utility_room
418-
- platform: state
418+
- trigger: state
419419
to: "off"
420420
entity_id: binary_sensor.activity_outside_front_door
421-
- platform: state
421+
- trigger: state
422422
to: "off"
423423
entity_id: binary_sensor.activity_outside_garage
424424
actions:

automations/mailbox.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
In the UI show the `input_boolean.mailbox_full`. It needs to
1414
be manually switched off after getting the mail."
1515
triggers:
16-
- platform: state
16+
- trigger: state
1717
entity_id: binary_sensor.mailbox_vibration
1818
to: "on"
1919
conditions:

automations/media_player.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
aren't playing Spotify (via WiFi) directly, switch the source of the speakers
1616
to "Opt".
1717
triggers:
18-
- platform: state
18+
- trigger: state
1919
entity_id: media_player.tv
20-
- platform: state
20+
- trigger: state
2121
entity_id: media_player.spotify
2222
to: paused
2323
conditions:
@@ -101,10 +101,10 @@
101101
mode: single
102102
max_exceeded: silent
103103
triggers:
104-
- platform: state
104+
- trigger: state
105105
entity_id: media_player.kef_ls50
106106
attribute: volume_level
107-
- platform: state
107+
- trigger: state
108108
entity_id: media_player.tv
109109
attribute: volume_level
110110
conditions:

automations/plant.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#- from github.com/basnijholt/home-assistant-config
1111
- alias: "Plant: problem with Calathea"
1212
triggers:
13-
- platform: state
13+
- trigger: state
1414
entity_id: plant.calathea
1515
to: "problem"
1616
- platform: time
@@ -28,7 +28,7 @@
2828
2929
- alias: "Plant: problem with Monstera"
3030
triggers:
31-
- platform: state
31+
- trigger: state
3232
entity_id: plant.monstera
3333
to: "problem"
3434
- platform: time
@@ -46,7 +46,7 @@
4646
4747
- alias: "Plant: problem with Peace lily"
4848
triggers:
49-
- platform: state
49+
- trigger: state
5050
entity_id: plant.peace_lily
5151
to: "problem"
5252
- platform: time

automations/security.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373

7474
- alias: "Security: no one is home but high power usage"
7575
triggers:
76-
- platform: state
76+
- trigger: state
7777
entity_id: binary_sensor.no_one_home
7878
to: "on"
7979
- platform: time_pattern
@@ -148,7 +148,7 @@
148148
- alias: "Security: Door to outside open"
149149
description: ''
150150
triggers:
151-
- platform: state
151+
- trigger: state
152152
entity_id: binary_sensor.door_to_outside_open
153153
to: 'on'
154154
for:

automations/sleep_mode.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
triggers:
1414
- platform: time
1515
at: "07:00"
16-
- platform: state
16+
- trigger: state
1717
entity_id: input_boolean.alarm_clock
1818
from: "on"
1919
to: "off"

0 commit comments

Comments
 (0)