AutomationDataset/azaeldrm/azaeldrm_automations.yaml

580 lines
14 KiB
YAML

- id: '1709341331298'
alias: Office lights on/off
description: Automatically adjust lights when turned on or if they become unavailable
or unknown
trigger:
- platform: state
entity_id:
- light.office_light
- light.office_light_2
to:
- 'on'
- unavailable
- unknown
- platform: tag
tag_id: 645fad09-7423-48d3-825f-0c196998f92d
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id:
- light.office_light
- light.office_light_2
state: 'on'
sequence:
- choose:
- conditions:
- condition: sun
after: sunrise
before: sunset
sequence:
- data:
kelvin: 5700
target:
entity_id:
- light.office_fan_lights
- light.office_monitor_backlight
action: light.turn_on
- data:
kelvin: 6000
target:
entity_id: light.office_desk_lightstrip
action: light.turn_on
- conditions:
- condition: or
conditions:
- condition: sun
before: sunrise
- condition: sun
after: sunset
sequence:
- data:
kelvin: 2800
target:
entity_id:
- light.office_fan_lights
- light.office_monitor_backlight
action: light.turn_on
- data:
kelvin: 2800
target:
entity_id: light.office_desk_lightstrip
action: light.turn_on
- conditions:
- condition: or
conditions:
- condition: state
entity_id:
- light.office_light
- light.office_light_2
state: unavailable
- condition: state
entity_id:
- light.office_light
- light.office_light_2
state: unknown
sequence:
- target:
entity_id:
- light.office_monitor_backlight
- light.office_desk_lightstrip
data: {}
action: light.turn_off
mode: single
- id: '1709792419847'
alias: Kitchen lights on/off
description: Control behavior of kitchen lights when they turn on or off/unavailable/unknown
trigger:
- platform: state
entity_id:
- light.kitchen_light_1
to:
- 'on'
- 'off'
- unavailable
- unknown
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id:
- light.kitchen_light_1
state: 'on'
sequence:
- choose:
- conditions:
- condition: sun
after: sunrise
- condition: sun
before: sunset
sequence:
- data:
kelvin: 5000
brightness_pct: 100
target:
area_id: kitchen
action: light.turn_on
- conditions:
- condition: or
conditions:
- condition: sun
before: sunrise
- condition: sun
after: sunset
sequence:
- data:
kelvin: 2000
brightness_pct: 80
target:
area_id: kitchen
action: light.turn_on
- conditions:
- condition: or
conditions:
- condition: state
entity_id:
- light.kitchen_light_1
state: 'off'
- condition: state
entity_id:
- light.kitchen_light_1
state: unavailable
- condition: state
entity_id:
- light.kitchen_light_1
state: unknown
sequence:
- target:
entity_id:
- light.counter_light_1
- light.counter_light_2
data: {}
action: light.turn_off
mode: single
- id: '1720575255139'
alias: Tag Work Mode NFC is scanned
description: ''
trigger:
- platform: tag
tag_id: 645fad09-7423-48d3-825f-0c196998f92d
condition: []
action:
- device_id: 2b2e8ba1a1ce9f22c6ecdf1aa5422e0a
domain: mobile_app
type: notify
message: Enable work mode
mode: single
- id: '1720575893940'
alias: Tag Game Mode NFC is scanned
description: ''
triggers:
- tag_id: 8d5f8587-3b83-4c92-9d6e-829b2745cc8d
trigger: tag
conditions: []
actions:
- target:
entity_id:
- light.office_fan_lights
data:
transition: 15
action: light.turn_off
- metadata: {}
data:
rgb_color:
- 130
- 188
- 36
action: light.turn_on
target:
entity_id: light.office_monitor_backlight
- action: light.turn_on
metadata: {}
data:
rgb_color:
- 153
- 255
- 0
target:
entity_id: light.office_desk_lightstrip
mode: single
- id: '1720670552296'
alias: Kitchen lights color temperature at sunrise and sunset
description: Adjust kitchen lights color temperature at sunrise and sunset
trigger:
- platform: sun
event: sunset
offset: 0
- platform: sun
event: sunrise
offset: 0
condition:
- condition: state
entity_id: light.kitchen_light_1
state: 'on'
action:
- choose:
- conditions:
- condition: sun
before: sunrise
after: sunset
sequence:
- data:
kelvin: 2000
transition: 90
brightness_pct: 80
target:
area_id: kitchen
action: light.turn_on
- conditions:
- condition: sun
before: sunset
after: sunrise
sequence:
- data:
kelvin: 5000
transition: 300
brightness_pct: 100
target:
area_id: kitchen
action: light.turn_on
mode: single
- id: '1720830788593'
alias: Office lights color temperature at sunrise and sunset
description: Adjust office lights color temperature at sunrise and sunset
trigger:
- platform: sun
event: sunset
offset: 0
- platform: sun
event: sunrise
offset: 0
condition:
- condition: state
entity_id: light.office_desk_lightstrip
state: 'on'
action:
- choose:
- conditions:
- condition: sun
before: sunset
after: sunrise
sequence:
- data:
kelvin: 5700
transition: 15
target:
entity_id:
- light.office_monitor_backlight
- light.office_fan_lights
action: light.turn_on
- data:
kelvin: 6000
transition: 15
target:
entity_id:
- light.office_desk_lightstrip
action: light.turn_on
- conditions:
- condition: sun
before: sunrise
after: sunset
sequence:
- data:
kelvin: 2800
transition: 15
target:
entity_id:
- light.office_desk_lightstrip
action: light.turn_on
- data:
kelvin: 2800
transition: 15
target:
entity_id:
- light.office_monitor_backlight
- light.office_fan_lights
action: light.turn_on
mode: single
- id: '1725363208408'
alias: Hallway light motion-controlled
description: Turn on the hallway light when motion is detected and turn it off after
a delay when no motion is detected.
trigger:
- platform: state
entity_id: binary_sensor.aqara_motion_sensor_hallway_occupancy_5
from: 'off'
to: 'on'
- platform: state
entity_id: binary_sensor.aqara_motion_sensor_hallway_occupancy_5
from: 'on'
to: 'off'
for: 00:00:10
condition:
- condition: or
conditions:
- condition: sun
before: sunrise
- condition: sun
after: sunset
action:
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.aqara_motion_sensor_hallway_occupancy_5
state: 'on'
sequence:
- target:
entity_id: light.hallway_light
data: {}
action: light.turn_on
- conditions:
- condition: state
entity_id: binary_sensor.aqara_motion_sensor_hallway_occupancy_5
state: 'off'
sequence:
- target:
entity_id: light.hallway_light
data: {}
action: light.turn_off
mode: single
- id: '1725364482087'
alias: Hallway lights color temperature at sunrise and sunset
description: Adjust hallway lights color temperature at sunrise and sunset
triggers:
- event: sunset
offset: 0
trigger: sun
- event: sunrise
offset: 0
trigger: sun
conditions:
- condition: or
conditions:
- condition: state
entity_id: light.hallway_light
state: 'on'
- condition: state
entity_id: light.hallway_light_2
state: 'on'
- condition: state
entity_id: light.smart_wi_fi_lighting
state: 'on'
actions:
- choose:
- conditions:
- condition: sun
after: sunset
sequence:
- target:
entity_id: "{% set lights = [] %} {% if is_state('light.hallway_light','on')\
\ %}\n {% set lights = lights + ['light.hallway_light'] %}\n{% endif\
\ %} {% if is_state('light.hallway_light_2', 'on') %}\n {% set lights\
\ = lights + ['light.hallway_light_2'] %}\n{% endif %} {% if is_state('light.smart_wi_fi_lighting',\
\ 'on') %}\n {% set lights = lights + ['light.smart_wi_fi_lighting']\
\ %}\n{% endif %} {{ lights | join(', ') }}\n"
data:
kelvin: 2000
transition: 90
brightness_pct: 80
action: light.turn_on
- conditions:
- condition: sun
after: sunrise
sequence:
- target:
entity_id: "{% set lights = [] %} {% if is_state('light.hallway_light',\
\ 'on') %}\n {% set lights = lights + ['light.hallway_light'] %}\n{%\
\ endif %} {% if is_state('light.hallway_light_2', 'on') %}\n {% set\
\ lights = lights + ['light.hallway_light_2'] %}\n{% endif %} {% if is_state('light.smart_wi_fi_lighting',\
\ 'on') %}\n {% set lights = lights + ['light.smart_wi_fi_lighting']\
\ %}\n{% endif %} {{ lights | join(', ') }}\n"
data:
kelvin: 5000
transition: 300
brightness_pct: 100
action: light.turn_on
mode: single
- id: '1741171850753'
alias: Ambient mode The Frame
description: ''
triggers:
- device_id: 34208c67fd30108e53ebcf1b33d393e8
domain: media_player
entity_id: 0c6acb4d0b07099a6fbb1a21d0f716b9
type: turned_off
trigger: device
conditions: []
actions:
- action: remote.send_command
metadata: {}
data:
num_repeats: 1
delay_secs: 0.4
hold_secs: 0
command: KEY_AMBIENT
target:
entity_id: remote.65_the_frame
mode: single
- id: '1751539910148'
alias: Hallway Lightstrip On-Off
description: Automatically adjust lights when turned on or if they become unavailable
or unknown
triggers:
- entity_id:
- light.smart_wi_fi_lighting
to:
- 'on'
- unavailable
- unknown
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: state
entity_id:
- light.smart_wi_fi_lighting
state: 'on'
sequence:
- choose:
- conditions:
- condition: sun
after: sunrise
before: sunset
sequence:
- data:
kelvin: 5000
action: light.turn_on
target:
entity_id:
- light.smart_wi_fi_lighting
- conditions:
- condition: or
conditions:
- condition: sun
after: sunset
before: sunrise
sequence:
- data:
kelvin: 2000
action: light.turn_on
target:
entity_id:
- light.smart_wi_fi_lighting
- conditions:
- condition: or
conditions:
- condition: state
entity_id:
- light.smart_wi_fi_lighting
state: unavailable
- condition: state
entity_id:
- light.smart_wi_fi_lighting
state: unknown
sequence:
- data: {}
action: light.turn_off
target:
entity_id:
- light.smart_wi_fi_lighting
mode: single
- id: '1751540240213'
alias: Hallway Chandelier Light On/Off
description: Automatically adjust lights when turned on or if they become unavailable
or unknown
triggers:
- entity_id:
- light.hallway_light_2
to:
- 'on'
- unavailable
- unknown
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: state
entity_id:
- light.hallway_light_2
state: 'on'
sequence:
- choose:
- conditions:
- condition: sun
after: sunrise
before: sunset
sequence:
- data:
kelvin: 5000
action: light.turn_on
target:
entity_id:
- light.hallway_light_2
- conditions:
- condition: or
conditions:
- condition: sun
after: sunset
before: sunrise
sequence:
- data:
kelvin: 2000
action: light.turn_on
target:
entity_id:
- light.hallway_light_2
- conditions:
- condition: or
conditions:
- condition: state
entity_id:
- light.hallway_light_2
state: unavailable
- condition: state
entity_id:
- light.hallway_light_2
state: unknown
sequence:
- data: {}
action: light.turn_off
target:
entity_id:
- light.hallway_light_2
mode: single
- id: '1751659782405'
alias: Curtain action at sunrise and sunset
description: ''
triggers:
- trigger: sun
event: sunset
offset: 0
- trigger: sun
event: sunrise
offset: 0
conditions: []
actions:
- choose:
- conditions:
- condition: sun
after: sunset
before: sunrise
sequence:
- device_id: 77f605ff6472af1fdcc9d5edcc6c00b3
domain: cover
entity_id: 2094f6d59f26ab8a969a200bfe574df2
type: close
- conditions:
- condition: sun
after: sunrise
before: sunset
sequence:
- device_id: 77f605ff6472af1fdcc9d5edcc6c00b3
domain: cover
entity_id: 2094f6d59f26ab8a969a200bfe574df2
type: open
mode: single