summaryrefslogtreecommitdiffstats
path: root/automations.yaml
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2023-06-23 04:44:16 +0400
committerSuren A. Chilingaryan <csa@suren.me>2023-06-23 04:44:16 +0400
commit2674a5226e13a68b1ee570aef552e78b7a7337b8 (patch)
treecaf3b55045249cd124717109a652506576ff2cfc /automations.yaml
parent756a33999df9255deb1c08a443a5621d94da0126 (diff)
downloadhass-2674a5226e13a68b1ee570aef552e78b7a7337b8.tar.gz
hass-2674a5226e13a68b1ee570aef552e78b7a7337b8.tar.bz2
hass-2674a5226e13a68b1ee570aef552e78b7a7337b8.tar.xz
hass-2674a5226e13a68b1ee570aef552e78b7a7337b8.zip
Massive update: Few fixes, more new integrations & extensions
Diffstat (limited to 'automations.yaml')
-rw-r--r--automations.yaml711
1 files changed, 609 insertions, 102 deletions
diff --git a/automations.yaml b/automations.yaml
index 38cc979..1b14bd5 100644
--- a/automations.yaml
+++ b/automations.yaml
@@ -42,7 +42,10 @@
minutes: 0
seconds: 0
id: Away
- condition: []
+ condition:
+ - condition: state
+ entity_id: input_boolean.mode_hall_manual
+ state: 'off'
action:
- choose:
- conditions:
@@ -94,8 +97,8 @@
entity_id: switch.kitchen_lights_left
domain: switch
- type: turn_off
- device_id: 558ce3c924f9478aad68cb5b98f05ecc
- entity_id: switch.kitchen_lights_center
+ device_id: dd315d1369ab360867d7daba78d2aebd
+ entity_id: switch.kitchen_ledlights
domain: switch
- if:
- condition: state
@@ -156,7 +159,7 @@
device_id: bf45f1d630db6e2aa1307866603f548a
entity_id: light.smart_light
domain: light
- - service: shell_command.sound_living
+ - service: shell_command.sound_bedroom_off
data: {}
off_click:
- type: turn_off
@@ -338,6 +341,30 @@
- condition: trigger
id: left_hold
sequence:
+ - service: script.bedroom_aircon
+ data: {}
+ - conditions:
+ - condition: trigger
+ id: right
+ sequence:
+ - service: shell_command.sound_bedroom_on
+ data: {}
+ - service: media_player.media_play_pause
+ target:
+ entity_id: media_player.smartpi
+ data: {}
+ - conditions:
+ - condition: trigger
+ id: right_dbl
+ sequence:
+ - service: script.play_playlist
+ data:
+ media_player: media_player.smartpi
+ playlist: darksoft
+ - conditions:
+ - condition: trigger
+ id: right_hold
+ sequence:
- service: input_button.press
data: {}
target:
@@ -370,30 +397,6 @@
media_content_id: media-source://dlna_dms/asgard/:64$0$5$1
- media_content_type: object.container.storageFolder
media_content_id: media-source://dlna_dms/asgard/:64$0$5$1$0
- - conditions:
- - condition: trigger
- id: right
- sequence:
- - service: shell_command.sound_combined
- data: {}
- - service: media_player.media_play_pause
- target:
- entity_id: media_player.smartpi
- data: {}
- - conditions:
- - condition: trigger
- id: right_dbl
- sequence:
- - service: script.play_playlist
- data:
- media_player: media_player.smartpi
- playlist: darksoft
- - conditions:
- - condition: trigger
- id: right_hold
- sequence:
- - service: script.bedroom_aircon
- data: {}
default:
- service: input_button.press
data: {}
@@ -538,12 +541,101 @@
- condition: template
value_template: '{{ trigger.event.data.command == "/camera" }} '
sequence:
- - service: telegram_bot.send_photo
- data:
- disable_notification: true
- caption: AubergineView
- url: http://smartpi:8123{{ state_attr("camera.192_168_50_51", "entity_picture")
- }}
+ - choose:
+ - conditions:
+ - condition: template
+ value_template: '{{ trigger.event.data.args|length == 1 }}'
+ - condition: template
+ value_template: '{{ trigger.event.data.args[0] in ["hall", "aubergine",
+ "aubergineview" ] }}'
+ sequence:
+ - service: telegram_bot.send_photo
+ data:
+ disable_notification: true
+ caption: AubergineView
+ url: http://smartpi:8123{{ state_attr("camera.192_168_50_51", "entity_picture")
+ }}
+ - conditions:
+ - condition: template
+ value_template: '{{ trigger.event.data.args|length == 1 }}'
+ - condition: template
+ value_template: '{{ trigger.event.data.args[0] in ["door", "peep", "peepview"
+ ] }}'
+ sequence:
+ - service: telegram_bot.send_photo
+ data:
+ disable_notification: true
+ caption: PeepView
+ url: http://smartpi:8123{{ state_attr("camera.192_168_50_132", "entity_picture")
+ }}
+ - conditions:
+ - condition: template
+ value_template: '{{ trigger.event.data.args|length == 1 }}'
+ - condition: template
+ value_template: '{{ trigger.event.data.args[0] in ["kitchen", "oven",
+ "kitchenview", "ovenview" ] }}'
+ sequence:
+ - service: telegram_bot.send_photo
+ data:
+ disable_notification: true
+ caption: OvenView
+ url: http://smartpi:8123{{ state_attr("camera.ovenview", "entity_picture")
+ }}
+ - conditions:
+ - condition: template
+ value_template: '{{ trigger.event.data.args|length == 0 }}'
+ sequence:
+ - service: telegram_bot.send_photo
+ data:
+ disable_notification: true
+ caption: PeepView
+ url: http://smartpi:8123{{ state_attr("camera.192_168_50_132", "entity_picture")
+ }}
+ - service: telegram_bot.send_photo
+ data:
+ disable_notification: true
+ caption: OvenView
+ url: http://smartpi:8123{{ state_attr("camera.ovenview", "entity_picture")
+ }}
+ - service: telegram_bot.send_photo
+ data:
+ disable_notification: true
+ caption: AubergineView
+ url: http://smartpi:8123{{ state_attr("camera.192_168_50_51", "entity_picture")
+ }}
+ default:
+ - service: notify.smartpi
+ data:
+ message: 'Unknown camera: {{ trigger.event.data.args[0] }}'
+ - conditions:
+ - condition: template
+ value_template: '{{ trigger.event.data.command == "/open" }} '
+ sequence:
+ - choose:
+ - conditions:
+ - condition: or
+ conditions:
+ - condition: template
+ value_template: '{{ trigger.event.data.args|length == 0 }}'
+ - condition: and
+ conditions:
+ - condition: template
+ value_template: '{{ trigger.event.data.args|length == 1 }}'
+ - condition: template
+ value_template: '{{ trigger.event.data.args[0] in ["h24", "halabyan24",
+ "building", "home" ] }}'
+ sequence:
+ - service: switch.turn_on
+ data: {}
+ target:
+ entity_id: switch.hall_speakerphone
+ - service: notify.smartpi
+ data:
+ message: Openning Halabyan 24 building door
+ default:
+ - service: notify.smartpi
+ data:
+ message: 'Unknown lock: {{ trigger.event.data.args[0] }}'
default:
- service: notify.smartpi
data:
@@ -551,7 +643,7 @@
{{ trigger.event.data.args }}'
mode: single
- id: '1672608894803'
- alias: 'Hall: Camera Switch'
+ alias: 'Hall: Hall Camera Switch'
description: ''
use_blueprint:
path: lights/light_switch.yaml
@@ -578,10 +670,42 @@
data:
mode: sleep
target: house
- - service: input_button.press
- data: {}
+ - if:
+ - condition: state
+ entity_id: binary_sensor.balcony_doors
+ state: 'on'
+ then:
+ - service: light.turn_on
+ target:
+ entity_id: light.aqara_hub_m1s_426c
+ data:
+ brightness: 100
+ rgb_color:
+ - 255
+ - 0
+ - 0
+ - service: input_button.press
+ data: {}
+ target:
+ entity_id: input_button.button_confirm
+ else:
+ - service: light.turn_on
+ target:
+ entity_id: light.aqara_hub_m1s_426c
+ data:
+ brightness: 100
+ rgb_color:
+ - 0
+ - 255
+ - 0
+ - delay:
+ hours: 0
+ minutes: 0
+ seconds: 30
+ milliseconds: 0
+ - service: light.turn_off
target:
- entity_id: input_button.button_confirm
+ entity_id: light.aqara_hub_m1s_426c
- id: '1672627582279'
alias: 'Hall: Kitchen Combo'
description: ''
@@ -604,7 +728,7 @@
- switch.entrance_lights_center
data: {}
- id: '1672629824242'
- alias: 'Hall: Away/Security Mode Switch'
+ alias: 'Hall: Hall Away/Security Mode Switch'
description: ''
use_blueprint:
path: lights/light_switch.yaml
@@ -616,6 +740,7 @@
- service: switch.turn_on
target:
entity_id: switch.hall_lights_center
+ data: {}
- service: input_button.press
data: {}
target:
@@ -674,20 +799,18 @@
knob: sensor.office_knob_action
toggle:
- if:
- - condition: device
- type: is_on
- device_id: 32787706a8ff87380633b7c817057935
- entity_id: switch.living_tablelamp
- domain: switch
+ - condition: state
+ entity_id: switch.living_tablelampsocket
+ state: 'on'
then:
- service: switch.turn_off
data: {}
target:
entity_id: switch.lights_living_lustre
- - type: toggle
- device_id: 32787706a8ff87380633b7c817057935
- entity_id: switch.living_tablelamp
- domain: switch
+ - service: switch.toggle
+ data: {}
+ target:
+ entity_id: switch.living_tablelampsocket
brightness: input_number.knob_office_brightness0
temperature: input_number.knob_office_temperature0
hue: input_number.knob_office_hue0
@@ -721,10 +844,9 @@
entity_id: switch.lights_living_lustre
state: 'on'
then:
- - type: turn_off
- device_id: 32787706a8ff87380633b7c817057935
- entity_id: switch.living_tablelamp
- domain: switch
+ - service: switch.turn_off
+ target:
+ entity_id: switch.living_tablelampsocket
- service: homeassistant.toggle
data: {}
target:
@@ -747,17 +869,17 @@
on_click:
- if:
- condition: state
- entity_id: switch.living_tablelamp
+ entity_id: switch.living_tablelampsocket
state: 'on'
then:
- - type: turn_off
- device_id: 32787706a8ff87380633b7c817057935
- entity_id: switch.living_tablelamp
- domain: switch
+ - service: switch.turn_off
+ data: {}
+ target:
+ entity_id: switch.living_tablelampsocket
else:
- if:
- condition: state
- entity_id: switch.smart_power_strip_pro_socket_1
+ entity_id: switch.smart_power_strip_pro_socket_2
state: 'off'
then:
- parallel:
@@ -777,20 +899,19 @@
- service: script.turn_on_office_lights
data: {}
off_click:
- - type: turn_on
- device_id: 32787706a8ff87380633b7c817057935
- entity_id: switch.living_tablelamp
- domain: switch
+ - service: switch.turn_on
+ data: {}
+ target:
+ entity_id: switch.living_tablelampsocket
dblclick:
- if:
- condition: state
entity_id: switch.lights_living_lustre
state: 'on'
then:
- - type: turn_off
- device_id: 32787706a8ff87380633b7c817057935
- entity_id: switch.living_tablelamp
- domain: switch
+ - service: switch.turn_off
+ target:
+ entity_id: switch.living_tablelampsocket
- service: homeassistant.toggle
data: {}
target:
@@ -800,7 +921,7 @@
longclick:
- if:
- condition: state
- entity_id: switch.smart_power_strip_pro_socket_1
+ entity_id: switch.smart_power_strip_pro_socket_2
state: 'off'
then:
- service: script.sleep_and_wake
@@ -859,7 +980,7 @@
input:
light_target:
- switch.kitchen_lights_left
- - switch.kitchen_lights_center
+ - switch.kitchen_ledlights
motion_entity: binary_sensor.motions_kitchen
illumination_test: sensor
illuminance_entity: sensor.kitchen_motions_illuminance_lux
@@ -900,10 +1021,15 @@
brightness_pct: 100
off_click:
- parallel:
- - type: turn_off
- device_id: 5c1c363a6825ad5a006f3bb84bb104ce
- entity_id: switch.hall_lights_left
- domain: switch
+ - if:
+ - condition: state
+ entity_id: input_boolean.mode_hall_manual
+ state: 'off'
+ then:
+ - type: turn_off
+ device_id: 5c1c363a6825ad5a006f3bb84bb104ce
+ entity_id: switch.hall_lights_left
+ domain: switch
- type: turn_off
device_id: 87071fc9d8fb9ebbccb145f5642c7404
entity_id: light.aqara_hub_m1s_426c
@@ -1086,14 +1212,23 @@
minutes: 0
seconds: 0
id: sleep
- condition: []
+ condition:
+ - type: is_not_present
+ condition: device
+ device_id: 363c35226e1deea236d4a555c465522d
+ entity_id: binary_sensor.presence_presence
+ domain: binary_sensor
+ for:
+ hours: 0
+ minutes: 5
+ seconds: 0
action:
- choose:
- conditions:
- condition: trigger
id: sleep
- condition: state
- entity_id: switch.smart_power_strip_pro_socket_1
+ entity_id: switch.smart_power_strip_pro_socket_2
state: 'on'
sequence:
- service: script.sleep_and_wake
@@ -1107,16 +1242,26 @@
description: ''
trigger:
- platform: device
- type: turned_off
+ type: changed_states
device_id: 558ce3c924f9478aad68cb5b98f05ecc
entity_id: switch.kitchen_lights_left
domain: switch
condition: []
action:
- - type: turn_off
- device_id: 558ce3c924f9478aad68cb5b98f05ecc
- entity_id: switch.kitchen_lights_center
- domain: switch
+ - if:
+ - condition: state
+ entity_id: switch.kitchen_lights_left
+ state: 'on'
+ then:
+ - type: turn_on
+ device_id: dd315d1369ab360867d7daba78d2aebd
+ entity_id: switch.kitchen_ledlights
+ domain: switch
+ else:
+ - type: turn_off
+ device_id: dd315d1369ab360867d7daba78d2aebd
+ entity_id: switch.kitchen_ledlights
+ domain: switch
mode: single
- id: '1673212686198'
alias: 'Office: Sven'
@@ -1204,21 +1349,19 @@
value_template: '{{ current_num == 0 }}'
sequence:
- if:
- - condition: device
- type: is_on
- device_id: 32787706a8ff87380633b7c817057935
- entity_id: switch.living_tablelamp
- domain: switch
+ - condition: state
+ entity_id: switch.living_tablelampsocket
+ state: 'on'
then:
- service: switch.turn_off
data: {}
target:
entity_id: switch.lights_living_lustre
enabled: false
- - type: toggle
- device_id: 32787706a8ff87380633b7c817057935
- entity_id: switch.living_tablelamp
- domain: switch
+ - service: switch.toggle
+ target:
+ entity_id: switch.living_tablelampsocket
+ data: {}
default: []
- id: '1674510035217'
alias: 'Network: Backup'
@@ -1275,6 +1418,8 @@
no_motion_wait: 60
on_cond_should_be_off:
- switch.lights_guest
+ off_cond_should_be_off:
+ - input_boolean.mode_hall_manual
- id: '1680829267506'
alias: 'Motions: Living'
description: ''
@@ -1314,6 +1459,8 @@
target:
entity_id: media_player.smartpi
data: {}
+ - service: shell_command.sound_living
+ data: {}
off_click:
- parallel:
- service: script.sleep_and_wake
@@ -1337,11 +1484,17 @@
- platform: state
entity_id:
- input_boolean.mode_alone
+ id: alone
+ - platform: state
+ entity_id:
- input_boolean.mode_guests
+ id: guests
condition: []
action:
- choose:
- conditions:
+ - condition: trigger
+ id: guests
- condition: state
entity_id: input_boolean.mode_guests
state: 'on'
@@ -1351,6 +1504,8 @@
target:
entity_id: automation.motions_guestroom
- conditions:
+ - condition: trigger
+ id: guests
- condition: state
entity_id: input_boolean.mode_guests
state: 'off'
@@ -1360,24 +1515,35 @@
target:
entity_id: automation.motions_guestroom
- conditions:
+ - condition: trigger
+ id: alone
- condition: state
entity_id: input_boolean.mode_alone
state: 'on'
sequence:
- - service: automation.turn_on
- data: {}
- target:
- entity_id: automation.motions_bedroom
+ - parallel:
+ - service: automation.turn_on
+ data: {}
+ target:
+ entity_id:
+ - automation.motions_bedroom_v2
- conditions:
+ - condition: trigger
+ id: alone
- condition: state
entity_id: input_boolean.mode_alone
state: 'off'
sequence:
- - service: automation.turn_off
- data: {}
- target:
- entity_id: automation.motions_bedroom
- mode: single
+ - parallel:
+ - service: input_boolean.turn_on
+ data: {}
+ target:
+ entity_id: input_boolean.mode_multiroom_manual
+ - service: automation.turn_off
+ data: {}
+ target:
+ entity_id:
+ - automation.motions_bedroom_v2
- id: '1680923844207'
alias: 'Motions: Bedroom from Hall'
description: ''
@@ -1396,9 +1562,6 @@
entity_id: input_boolean.mode_alone
state: 'on'
- condition: state
- entity_id: input_boolean.mode_guests
- state: 'off'
- - condition: state
entity_id:
- binary_sensor.bedroom_bedsidelamp
- switch.bedroom_tablelamp
@@ -1532,10 +1695,10 @@
entity_id: media_player.smartpi
type: is_playing
then:
- - service: shell_command.sound_living
+ - service: shell_command.sound_bedroom_off
data: {}
else:
- - service: shell_command.sound_combined
+ - service: shell_command.sound_bedroom_on
data: {}
- service: media_player.media_play_pause
target:
@@ -1563,3 +1726,347 @@
target:
entity_id: input_button.button_confirm
mode: single
+- id: '1686356828884'
+ alias: 'Motions: Kitchen Music'
+ description: ''
+ trigger:
+ - type: motion
+ platform: device
+ device_id: c021c60965f213e2de888cadc3c48a8a
+ entity_id: binary_sensor.kitchen_motions_occupancy
+ domain: binary_sensor
+ id: 'on'
+ - type: no_motion
+ platform: device
+ device_id: c021c60965f213e2de888cadc3c48a8a
+ entity_id: binary_sensor.kitchen_motions_occupancy
+ domain: binary_sensor
+ for:
+ hours: 0
+ minutes: 4
+ seconds: 0
+ id: 'off'
+ - type: not_present
+ platform: device
+ device_id: f669195bbff38ba24c6cbe552fc9f180
+ entity_id: binary_sensor.bedroom_presence_presence
+ domain: binary_sensor
+ for:
+ hours: 0
+ minutes: 2
+ seconds: 0
+ id: bedroom
+ condition:
+ - condition: state
+ entity_id: input_boolean.mode_multiroom_manual
+ state: 'off'
+ action:
+ - choose:
+ - conditions:
+ - condition: trigger
+ id: 'on'
+ sequence:
+ service: shell_command.sound_kitchen_on
+ data: {}
+ - conditions:
+ - condition: trigger
+ id: 'off'
+ sequence:
+ - if:
+ - condition: state
+ entity_id: binary_sensor.presence_multiroom_sound
+ state: 'off'
+ then:
+ - service: shell_command.sound_kitchen_off
+ data: {}
+ - conditions:
+ - condition: trigger
+ id: bedroom
+ sequence:
+ - if:
+ - condition: state
+ entity_id: binary_sensor.presence_multiroom_sound
+ state: 'off'
+ then:
+ - service: shell_command.sound_bedroom_off
+ data: {}
+ mode: single
+- id: '1686359598932'
+ alias: 'Hall: Kitchen Music'
+ description: ''
+ use_blueprint:
+ path: lights/light_switch.yaml
+ input:
+ switch: switch.kitchen_lights_center
+ light: switch.lights_dummy
+ on_click:
+ - service: shell_command.sound_kitchen_on
+ data: {}
+ off_click:
+ - service: shell_command.sound_kitchen_off
+ data: {}
+ dblclick:
+ - service: input_boolean.turn_on
+ data: {}
+ target:
+ entity_id: input_boolean.mode_multiroom_manual
+- id: '1686693695647'
+ alias: 'Motions: Bedroom v2'
+ description: ''
+ use_blueprint:
+ path: motion/presence_switch.yaml
+ input:
+ light_target:
+ - switch.bedroom_lights_left
+ - switch.bedroom_lights_center
+ motion_entity: binary_sensor.bedroom_motions_occupancy
+ presence_entity: binary_sensor.bedroom_presence_presence
+ illumination_test: sun
+ illuminance_entity: sensor.kitchen_motions_illuminance_lux
+ lux_threshold: 60
+ no_motion_wait: 300
+ on_cond_should_be_off:
+ - switch.lights_bedroom
+ on_cond_should_be_on:
+ - binary_sensor.hall_motions_occupancy
+ off_cond_should_be_off: []
+ on_click:
+ - service: automation.turn_on
+ data: {}
+ target:
+ entity_id: automation.motions_bedroom_from_hall
+ off_click:
+ - service: script.turn_off_bedroom_lights
+ data: {}
+ off_cond_should_be_on:
+ - switch.lights_bedroom
+ - switch.lights_bedroom_manual
+- id: '1686879286738'
+ alias: Time
+ description: ''
+ trigger:
+ - platform: time
+ at: '11:00:00'
+ id: morning
+ - platform: time
+ at: '21:00:00'
+ id: evening
+ condition: []
+ action:
+ - choose:
+ - conditions:
+ - condition: trigger
+ id: morning
+ sequence:
+ - parallel:
+ - if:
+ - condition: state
+ entity_id: input_boolean.mode_alone
+ state: 'on'
+ then:
+ - service: input_boolean.turn_off
+ data: {}
+ target:
+ entity_id: input_boolean.mode_multiroom_manual
+ - conditions:
+ - condition: trigger
+ id: evening
+ sequence:
+ - parallel:
+ - service: input_boolean.turn_on
+ data: {}
+ target:
+ entity_id: input_boolean.mode_multiroom_manual
+ mode: single
+- id: '1687120402112'
+ alias: 'Hall: Hall Manual Mode'
+ description: ''
+ use_blueprint:
+ path: lights/light_switch.yaml
+ input:
+ switch: switch.hall_lights_center
+ light: input_boolean.mode_hall_manual
+ delay: 0
+ on_click:
+ - service: switch.turn_on
+ data: {}
+ target:
+ entity_id:
+ - switch.entrance_lights_center
+ - switch.hall_lights_left
+ post_action: []
+- id: '1687206114066'
+ alias: Speakerphone
+ description: ''
+ trigger:
+ - platform: device
+ type: turned_on
+ device_id: 529c8fc6c1f99633f26bb254c97f2ab7
+ entity_id: switch.hall_speakerphone
+ domain: switch
+ for:
+ hours: 0
+ minutes: 0
+ seconds: 40
+ condition: []
+ action:
+ - type: turn_off
+ device_id: 529c8fc6c1f99633f26bb254c97f2ab7
+ entity_id: switch.hall_speakerphone
+ domain: switch
+ mode: single
+- id: '1687208079529'
+ alias: 'Motions: Bedroom AirCon'
+ description: ''
+ trigger:
+ - type: not_present
+ platform: device
+ device_id: f669195bbff38ba24c6cbe552fc9f180
+ entity_id: binary_sensor.bedroom_presence_presence
+ domain: binary_sensor
+ for:
+ hours: 0
+ minutes: 30
+ seconds: 0
+ condition: []
+ action:
+ - service: scene.turn_on
+ target:
+ entity_id: scene.hyundai_aircon2_off
+ metadata: {}
+ mode: single
+- id: '1687227285061'
+ alias: 'Hall: Hall Camera '
+ description: ''
+ trigger:
+ - platform: state
+ entity_id:
+ - input_boolean.mode_away
+ condition: []
+ action:
+ - choose:
+ - conditions:
+ - condition: state
+ entity_id: input_boolean.mode_away
+ state: 'on'
+ sequence:
+ - parallel:
+ - type: turn_on
+ device_id: 26d4f61d01f392350cd4375fcc3dbf50
+ entity_id: switch.hall_camera
+ domain: switch
+ - conditions:
+ - condition: state
+ entity_id: input_boolean.mode_away
+ state: 'off'
+ sequence:
+ - parallel:
+ - type: turn_off
+ device_id: 26d4f61d01f392350cd4375fcc3dbf50
+ entity_id: switch.hall_camera
+ domain: switch
+ mode: single
+- id: '1687256985181'
+ alias: Power Outtage
+ description: ''
+ trigger:
+ - platform: state
+ entity_id:
+ - switch.hall_camera
+ from: unavailable
+ id: hall_camera
+ for:
+ hours: 0
+ minutes: 2
+ seconds: 0
+ - platform: state
+ entity_id:
+ - light.yeelight_color_0x7caaf86
+ from: unavailable
+ id: office_bulb
+ for:
+ hours: 0
+ minutes: 2
+ seconds: 0
+ condition: []
+ action:
+ - choose:
+ - conditions:
+ - condition: or
+ conditions:
+ - condition: trigger
+ id: hall_camera
+ - condition: trigger
+ id: office_bulb
+ sequence:
+ - service: homeassistant.turn_on
+ data: {}
+ target:
+ entity_id: switch.plugs_infrastructure
+ - type: turn_off
+ device_id: 95931a9049849e575f2de543adf111eb
+ entity_id: light.yeelight_color_0x7caaf86
+ domain: light
+ - type: turn_off
+ device_id: bf45f1d630db6e2aa1307866603f548a
+ entity_id: light.smart_light
+ domain: light
+ - if:
+ - condition: state
+ entity_id: input_boolean.mode_away
+ state: 'on'
+ then:
+ - type: turn_on
+ device_id: 26d4f61d01f392350cd4375fcc3dbf50
+ entity_id: switch.hall_camera
+ domain: switch
+ else:
+ - type: turn_off
+ device_id: 26d4f61d01f392350cd4375fcc3dbf50
+ entity_id: switch.hall_camera
+ domain: switch
+ default: []
+ mode: single
+- id: '1687314395271'
+ alias: 'Motions: Bathroom v2'
+ description: ''
+ use_blueprint:
+ path: motion/occupancy_tracking_restart.yaml
+ input:
+ entrance: binary_sensor.bathroom_motions_occupancy
+ inside: binary_sensor.bathroom_motions2_occupancy
+ light: switch.bathroom_lights_left
+ occupancy: input_boolean.occupancy_bathroom
+ on_action:
+ - service: switch.turn_on
+ data: {}
+ target:
+ entity_id: switch.bathroom_lights_left
+ reentry_wait: 10
+ reentry_timeout: 90
+- id: '1687317165822'
+ alias: Infrastructure
+ description: ''
+ trigger:
+ - platform: state
+ entity_id:
+ - switch.plugs_infrastructure
+ to: 'off'
+ id: 'off'
+ for:
+ hours: 0
+ minutes: 5
+ seconds: 0
+ condition: []
+ action:
+ - choose:
+ - conditions:
+ - condition: trigger
+ id: 'off'
+ sequence:
+ - service: homeassistant.turn_on
+ data: {}
+ target:
+ entity_id: switch.plugs_infrastructure
+ default: []
+ mode: single