summaryrefslogtreecommitdiffstats
path: root/automations.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'automations.yaml')
-rw-r--r--automations.yaml396
1 files changed, 386 insertions, 10 deletions
diff --git a/automations.yaml b/automations.yaml
index 4446daf..38cc979 100644
--- a/automations.yaml
+++ b/automations.yaml
@@ -64,6 +64,9 @@
- conditions:
- condition: trigger
id: Toilet
+ - condition: state
+ entity_id: binary_sensor.toilet_motions_occupancy
+ state: 'off'
sequence:
- type: turn_off
device_id: 07b7086cf34752386c82a5109311ac6e
@@ -81,14 +84,35 @@
device_id: 04c6f563c006599ed7754aba652654ae
entity_id: switch.bathroom_lights_center
domain: switch
- - type: turn_off
- device_id: 558ce3c924f9478aad68cb5b98f05ecc
- entity_id: switch.kitchen_lights_left
- domain: switch
- - type: turn_off
- device_id: 558ce3c924f9478aad68cb5b98f05ecc
- entity_id: switch.kitchen_lights_center
- domain: switch
+ - if:
+ - condition: state
+ entity_id: binary_sensor.motions_kitchen
+ state: 'off'
+ then:
+ - type: turn_off
+ device_id: 558ce3c924f9478aad68cb5b98f05ecc
+ entity_id: switch.kitchen_lights_left
+ domain: switch
+ - type: turn_off
+ device_id: 558ce3c924f9478aad68cb5b98f05ecc
+ entity_id: switch.kitchen_lights_center
+ domain: switch
+ - if:
+ - condition: state
+ entity_id: binary_sensor.guestroom_motions_occupancy
+ state: 'off'
+ - condition: state
+ entity_id: input_boolean.mode_guests
+ state: 'off'
+ then:
+ - type: turn_off
+ device_id: e83c3f421447fac86b5089fbd286ed43
+ entity_id: switch.guestroom_lights_left
+ domain: switch
+ - type: turn_off
+ device_id: e83c3f421447fac86b5089fbd286ed43
+ entity_id: switch.guestroom_lights_center
+ domain: switch
default: []
mode: single
- id: '1654901560778'
@@ -132,6 +156,8 @@
device_id: bf45f1d630db6e2aa1307866603f548a
entity_id: light.smart_light
domain: light
+ - service: shell_command.sound_living
+ data: {}
off_click:
- type: turn_off
device_id: 4ca2827c57a086e0da4d63756b15261b
@@ -288,6 +314,7 @@
target:
entity_id:
- switch.lights_living
+ data: {}
- service: script.sleep_and_wake
data:
mode: hibernate
@@ -347,6 +374,24 @@
- 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:
@@ -788,7 +833,7 @@
target:
entity_id: input_button.button_confirm
data: {}
- temperature: 6000
+ temperature: 4500
on_light: 'no'
- id: '1672991247298'
alias: 'Living: Light Sync'
@@ -818,7 +863,7 @@
motion_entity: binary_sensor.motions_kitchen
illumination_test: sensor
illuminance_entity: sensor.kitchen_motions_illuminance_lux
- lux_threshold: 40
+ lux_threshold: 60
- id: '1673037015865'
alias: 'Motions: Night Light'
description: ''
@@ -863,6 +908,8 @@
device_id: 87071fc9d8fb9ebbccb145f5642c7404
entity_id: light.aqara_hub_m1s_426c
domain: light
+ door_entity:
+ - binary_sensor.entrance_door_contact
- id: '1673153262822'
alias: 'Motions: Global v1'
description: ''
@@ -1187,3 +1234,332 @@
data:
message: Connected via Vivacell
mode: single
+- id: '1680824553612'
+ alias: 'Motions: Bedroom'
+ description: ''
+ use_blueprint:
+ path: motion/motion_switch.yaml
+ input:
+ light_target:
+ - switch.bedroom_lights_left
+ - switch.bedroom_lights_center
+ motion_entity: binary_sensor.bedroom_motions_occupancy
+ illumination_test: sun
+ illuminance_entity: sensor.kitchen_motions_illuminance_lux
+ lux_threshold: 60
+ no_motion_wait: 60
+ on_cond_should_be_off:
+ - switch.lights_bedroom
+ on_cond_should_be_on:
+ - binary_sensor.hall_motions_occupancy
+ off_cond_should_be_off:
+ - switch.lights_bedroom
+ on_click:
+ - service: automation.turn_on
+ data: {}
+ target:
+ entity_id: automation.motions_bedroom_from_hall
+- id: '1680827972411'
+ alias: 'Motions: Guestroom'
+ description: ''
+ use_blueprint:
+ path: motion/motion_switch.yaml
+ input:
+ light_target:
+ - switch.guestroom_lights_left
+ - switch.guestroom_lights_center
+ motion_entity: binary_sensor.guestroom_motions_occupancy
+ illumination_test: sun
+ illuminance_entity: sensor.kitchen_motions_illuminance_lux
+ lux_threshold: 60
+ no_motion_wait: 60
+ on_cond_should_be_off:
+ - switch.lights_guest
+- id: '1680829267506'
+ alias: 'Motions: Living'
+ description: ''
+ use_blueprint:
+ path: motion/motion_switch.yaml
+ input:
+ light_target:
+ - switch.living_lights_left
+ - switch.living_lights_center
+ motion_entity: binary_sensor.presence_presence
+ illumination_test: sun
+ illuminance_entity: sensor.kitchen_motions_illuminance_lux
+ lux_threshold: 60
+ no_motion_wait: 1200
+ on_cond_should_be_off:
+ - switch.lights_living
+ on_cond_should_be_on:
+ - binary_sensor.hall_motions_occupancy
+- id: '1680830396231'
+ alias: 'Motions: Living Office Wakeup'
+ description: ''
+ use_blueprint:
+ path: motion/motion_switch.yaml
+ input:
+ light_target: []
+ motion_entity: binary_sensor.presence_presence
+ illumination_test: none
+ illuminance_entity: sensor.presence_illuminance_lux
+ lux_threshold: 60
+ on_click:
+ - parallel:
+ - service: script.sleep_and_wake
+ data:
+ mode: wake
+ target: office
+ - service: media_player.media_play
+ target:
+ entity_id: media_player.smartpi
+ data: {}
+ off_click:
+ - parallel:
+ - service: script.sleep_and_wake
+ data:
+ mode: hibernate
+ target: office
+ - service: switch.turn_off
+ data: {}
+ target:
+ entity_id: switch.lights_living
+ no_motion_wait: 2400
+ on_cond_should_be_on:
+ - binary_sensor.hall_motions_occupancy
+ - input_boolean.mode_office_sleep
+ off_cond_should_be_off:
+ - binary_sensor.hall_motions_occupancy
+- id: '1680918876959'
+ alias: Modes
+ description: ''
+ trigger:
+ - platform: state
+ entity_id:
+ - input_boolean.mode_alone
+ - input_boolean.mode_guests
+ condition: []
+ action:
+ - choose:
+ - conditions:
+ - condition: state
+ entity_id: input_boolean.mode_guests
+ state: 'on'
+ sequence:
+ - service: automation.turn_off
+ data: {}
+ target:
+ entity_id: automation.motions_guestroom
+ - conditions:
+ - condition: state
+ entity_id: input_boolean.mode_guests
+ state: 'off'
+ sequence:
+ - service: automation.turn_on
+ data: {}
+ target:
+ entity_id: automation.motions_guestroom
+ - conditions:
+ - condition: state
+ entity_id: input_boolean.mode_alone
+ state: 'on'
+ sequence:
+ - service: automation.turn_on
+ data: {}
+ target:
+ entity_id: automation.motions_bedroom
+ - conditions:
+ - condition: state
+ entity_id: input_boolean.mode_alone
+ state: 'off'
+ sequence:
+ - service: automation.turn_off
+ data: {}
+ target:
+ entity_id: automation.motions_bedroom
+ mode: single
+- id: '1680923844207'
+ alias: 'Motions: Bedroom from Hall'
+ description: ''
+ trigger:
+ - type: no_motion
+ platform: device
+ device_id: 6deb0a6fb7a4a849ba22afc166cf9919
+ entity_id: binary_sensor.hall_motions_occupancy
+ domain: binary_sensor
+ for:
+ hours: 0
+ minutes: 0
+ seconds: 30
+ condition:
+ - condition: state
+ 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
+ - switch.bedroom_lights_right
+ state: 'off'
+ - type: is_no_motion
+ condition: device
+ device_id: 4df2316b687cb4638268ae44eaad7e14
+ entity_id: binary_sensor.bedroom_motions_occupancy
+ domain: binary_sensor
+ for:
+ hours: 0
+ minutes: 0
+ seconds: 20
+ action:
+ - service: homeassistant.turn_off
+ data: {}
+ target:
+ entity_id: switch.lights_bedroom
+ - service: automation.turn_off
+ data:
+ stop_actions: false
+ target:
+ entity_id: automation.motions_bedroom_from_hall
+ mode: single
+- id: '1681005500468'
+ alias: 'Bedroom: Switch3'
+ description: ''
+ trigger:
+ - platform: device
+ domain: mqtt
+ device_id: dd15920a1e112dc1f45e5dd497aa3939
+ type: action
+ subtype: 1_single
+ discovery_id: 0x70ac08fffe419fa1 action_1_single
+ id: left1
+ - platform: device
+ domain: mqtt
+ device_id: dd15920a1e112dc1f45e5dd497aa3939
+ type: action
+ subtype: 2_single
+ discovery_id: 0x70ac08fffe419fa1 action_2_single
+ id: center1
+ - platform: device
+ domain: mqtt
+ device_id: dd15920a1e112dc1f45e5dd497aa3939
+ type: action
+ subtype: 3_single
+ discovery_id: 0x70ac08fffe419fa1 action_3_single
+ id: right1
+ - platform: device
+ domain: mqtt
+ device_id: dd15920a1e112dc1f45e5dd497aa3939
+ type: action
+ subtype: 1_double
+ discovery_id: 0x70ac08fffe419fa1 action_1_double
+ id: left2
+ - platform: device
+ domain: mqtt
+ device_id: dd15920a1e112dc1f45e5dd497aa3939
+ type: action
+ subtype: 2_double
+ discovery_id: 0x70ac08fffe419fa1 action_2_double
+ id: center2
+ - platform: device
+ domain: mqtt
+ device_id: dd15920a1e112dc1f45e5dd497aa3939
+ type: action
+ subtype: 3_double
+ discovery_id: 0x70ac08fffe419fa1 action_3_double
+ id: right2
+ - platform: device
+ domain: mqtt
+ device_id: dd15920a1e112dc1f45e5dd497aa3939
+ type: action
+ subtype: 1_hold
+ discovery_id: 0x70ac08fffe419fa1 action_1_hold
+ id: left3
+ - platform: device
+ domain: mqtt
+ device_id: dd15920a1e112dc1f45e5dd497aa3939
+ type: action
+ subtype: 2_hold
+ discovery_id: 0x70ac08fffe419fa1 action_2_hold
+ id: center3
+ - platform: device
+ domain: mqtt
+ device_id: dd15920a1e112dc1f45e5dd497aa3939
+ type: action
+ subtype: 3_hold
+ discovery_id: 0x70ac08fffe419fa1 action_3_hold
+ id: right3
+ condition: []
+ action:
+ - choose:
+ - conditions:
+ - condition: trigger
+ id: left1
+ sequence:
+ - service: homeassistant.toggle
+ data: {}
+ target:
+ entity_id:
+ - switch.bedroom_tablelamp
+ - conditions:
+ - condition: trigger
+ id: left2
+ sequence:
+ - service: homeassistant.toggle
+ data: {}
+ target:
+ entity_id:
+ - switch.bedroom_lights_left
+ - conditions:
+ - condition: trigger
+ id: left3
+ sequence:
+ - service: homeassistant.toggle
+ data: {}
+ target:
+ entity_id:
+ - light.smart_light
+ - conditions:
+ - condition: trigger
+ id: center1
+ sequence:
+ - if:
+ - condition: device
+ device_id: 8ea1ddea398d0a1bcbef996a9fdc06c5
+ domain: media_player
+ entity_id: media_player.smartpi
+ type: is_playing
+ then:
+ - service: shell_command.sound_living
+ data: {}
+ else:
+ - service: shell_command.sound_combined
+ data: {}
+ - service: media_player.media_play_pause
+ target:
+ entity_id: media_player.smartpi
+ data: {}
+ - conditions:
+ - condition: trigger
+ id: center2
+ sequence:
+ - service: media_player.media_next_track
+ data: {}
+ target:
+ entity_id: media_player.smartpi
+ - conditions:
+ - condition: trigger
+ id: center3
+ sequence:
+ - service: script.play_playlist
+ data:
+ media_player: media_player.smartpi
+ playlist: darksoft
+ default:
+ - service: input_button.press
+ data: {}
+ target:
+ entity_id: input_button.button_confirm
+ mode: single