mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 07:17:14 +00:00
The automation state trigger has deprecated its state alias (#2758)
The "state" used to be an alias for "to" but this was deprecated to make the meaning more clear. This commit updates the examples to no longer use the deprecated name.
This commit is contained in:
parent
8c13dcfe99
commit
476449131c
@ -43,16 +43,16 @@ automation:
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.pir1
|
||||
state: 'active'
|
||||
to: 'active'
|
||||
- platform: state
|
||||
entity_id: sensor.pir2
|
||||
state: 'active'
|
||||
to: 'active'
|
||||
- platform: state
|
||||
entity_id: sensor.door
|
||||
state: 'open'
|
||||
to: 'open'
|
||||
- platform: state
|
||||
entity_id: sensor.window
|
||||
state: 'open'
|
||||
to: 'open'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: alarm_control_panel.ha_alarm
|
||||
|
@ -26,7 +26,7 @@ automation:
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: group.all_devices
|
||||
state: 'not_home'
|
||||
to: 'not_home'
|
||||
condition:
|
||||
- platform: state
|
||||
entity_id: sun.sun
|
||||
@ -37,11 +37,11 @@ automation:
|
||||
|
||||
- alias: 'ManyThing Recording OFF'
|
||||
# This calls an IFTTT recipe to turn off recording of the ManyThing Camera
|
||||
# when we are home unless it's nighttime.
|
||||
# when we get home unless it's nighttime.
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: group.all_devices
|
||||
state: 'home'
|
||||
to: 'home'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sun.sun
|
||||
|
@ -53,10 +53,8 @@ alias: "Bathroom Motion Detected"
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.motion_sensor_166d0001171111
|
||||
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
state: 'on'
|
||||
action:
|
||||
service: media_player.turn_on
|
||||
data:
|
||||
|
@ -59,7 +59,7 @@ automation:
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.front_door_motion
|
||||
state: 'on'
|
||||
to: 'on'
|
||||
action:
|
||||
service: notify.livingroom_tv
|
||||
data:
|
||||
|
@ -45,7 +45,7 @@ Some example automations:
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: sensor.modem_callerid
|
||||
state: "callerid"
|
||||
to: "callerid"
|
||||
action:
|
||||
service: notify.notify
|
||||
data:
|
||||
@ -54,7 +54,7 @@ Some example automations:
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: sensor.modem_callerid
|
||||
state: "callerid"
|
||||
to: "callerid"
|
||||
action:
|
||||
service: persistent_notification.create
|
||||
data:
|
||||
@ -64,7 +64,7 @@ Some example automations:
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: sensor.modem_callerid
|
||||
state: "callerid"
|
||||
to: "callerid"
|
||||
action:
|
||||
service: tts.google_say
|
||||
data_template:
|
||||
|
@ -23,7 +23,7 @@ automation:
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.PIR1
|
||||
state: 'on'
|
||||
to: 'on'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: switch.AlmAct1
|
||||
@ -41,7 +41,7 @@ automation:
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: switch.AlmSnd1
|
||||
state: 'on'
|
||||
to: 'on'
|
||||
action:
|
||||
service: script.turn_on
|
||||
entity_id: script.flash_room1
|
||||
@ -50,11 +50,11 @@ automation:
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: switch.REL1
|
||||
state: 'off'
|
||||
to: 'off'
|
||||
condition:
|
||||
condition: state
|
||||
entity_id: switch.AlmSnd1
|
||||
state: 'off'
|
||||
to: 'off'
|
||||
action:
|
||||
service: script.turn_off
|
||||
entity_id: script.flash_room1
|
||||
|
@ -20,7 +20,7 @@ automation:
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.precip_intensity
|
||||
state: 'rain'
|
||||
to: 'rain'
|
||||
condition:
|
||||
- platform: state
|
||||
entity_id: group.all_devices
|
||||
@ -40,7 +40,7 @@ And then of course turn off the lamp when it stops raining but only if it's with
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.precip_intensity
|
||||
state: 'None'
|
||||
to: 'None'
|
||||
condition:
|
||||
- condition: sun
|
||||
after: 'sunset'
|
||||
|
@ -80,7 +80,7 @@ automation:
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: switch.KillHass
|
||||
state: 'on'
|
||||
to: 'on'
|
||||
action:
|
||||
service: homeassistant.stop
|
||||
- alias: 'Stop restarting HA is WeMo is found'
|
||||
|
@ -20,7 +20,7 @@ automation:
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: sensor.motion_sensor
|
||||
state: 'on'
|
||||
to: 'on'
|
||||
action:
|
||||
service: homeassistant.turn_on
|
||||
entity_id: light.kitchen
|
||||
@ -29,7 +29,7 @@ automation:
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: sensor.motion_sensor
|
||||
state: 'off'
|
||||
to: 'off'
|
||||
for:
|
||||
minutes: 10
|
||||
action:
|
||||
|
@ -26,7 +26,7 @@ automation:
|
||||
offset: '-01:00:00'
|
||||
- platform: state
|
||||
entity_id: group.all_devices
|
||||
state: 'home'
|
||||
to: 'home'
|
||||
condition:
|
||||
# Prefix the first line of each condition configuration
|
||||
# with a '-'' to enter multiple
|
||||
@ -45,7 +45,7 @@ automation:
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: group.all_devices
|
||||
state: 'not_home'
|
||||
to: 'not_home'
|
||||
action:
|
||||
service: light.turn_off
|
||||
entity_id: group.all_lights
|
||||
|
Loading…
x
Reference in New Issue
Block a user