summaryrefslogtreecommitdiffstats
path: root/automations.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'automations.yaml')
-rw-r--r--automations.yaml1057
1 files changed, 1057 insertions, 0 deletions
diff --git a/automations.yaml b/automations.yaml
new file mode 100644
index 0000000..3e183c3
--- /dev/null
+++ b/automations.yaml
@@ -0,0 +1,1057 @@
+- id: '1654820574086'
+ alias: 'Motions: Hall-based'
+ 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: 10
+ id: Short
+ - type: no_motion
+ platform: device
+ device_id: 6deb0a6fb7a4a849ba22afc166cf9919
+ entity_id: binary_sensor.hall_motions_occupancy
+ domain: binary_sensor
+ for:
+ hours: 0
+ minutes: 20
+ seconds: 0
+ id: Toilet
+ - type: no_motion
+ platform: device
+ device_id: 6deb0a6fb7a4a849ba22afc166cf9919
+ entity_id: binary_sensor.hall_motions_occupancy
+ domain: binary_sensor
+ for:
+ hours: 1
+ minutes: 0
+ seconds: 0
+ id: Long
+ - type: no_motion
+ platform: device
+ device_id: 6deb0a6fb7a4a849ba22afc166cf9919
+ entity_id: binary_sensor.hall_motions_occupancy
+ domain: binary_sensor
+ for:
+ hours: 20
+ minutes: 0
+ seconds: 0
+ id: Away
+ condition: []
+ action:
+ - choose:
+ - conditions:
+ - condition: trigger
+ id: Short
+ sequence:
+ - type: turn_off
+ device_id: 87071fc9d8fb9ebbccb145f5642c7404
+ entity_id: light.aqara_hub_m1s_426c
+ domain: light
+ - type: turn_off
+ device_id: 5c1c363a6825ad5a006f3bb84bb104ce
+ entity_id: switch.hall_lights_left
+ domain: switch
+ - type: turn_off
+ device_id: 07b7086cf34752386c82a5109311ac6e
+ entity_id: switch.entrance_lights_center
+ domain: switch
+ - conditions:
+ - condition: trigger
+ id: Toilet
+ sequence:
+ - type: turn_off
+ device_id: 07b7086cf34752386c82a5109311ac6e
+ entity_id: switch.entrance_lights_left
+ domain: switch
+ - conditions:
+ - condition: trigger
+ id: Long
+ sequence:
+ - type: turn_off
+ device_id: 04c6f563c006599ed7754aba652654ae
+ entity_id: switch.bathroom_lights_left
+ domain: switch
+ - type: turn_off
+ 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
+ default: []
+ mode: single
+- id: '1654901560778'
+ alias: 'Living: Office Light'
+ description: ''
+ use_blueprint:
+ path: lights/light_switch.yaml
+ input:
+ switch: switch.living_lights_right
+ light: light.yeelight_color_0x7caaf86
+ dblclick:
+ - parallel:
+ - service: script.sleep_and_wake
+ data:
+ mode: hibernate
+ target: office
+ - service: switch.turn_off
+ data: {}
+ target:
+ entity_id: switch.lights_living
+- id: '1654986053564'
+ alias: 'Hall: Kitchen LED'
+ description: ''
+ use_blueprint:
+ path: lights/light_switch.yaml
+ input:
+ switch: switch.kitchen_lights_center
+ light: switch.kitchen_ledlights
+- id: '1654986378177'
+ alias: 'Bedroom: Bulb'
+ description: ''
+ use_blueprint:
+ path: lights/light_switch.yaml
+ input:
+ switch: switch.bedroom_lights_right
+ light: light.smart_light
+ dblclick:
+ - service: script.turn_off_bedroom_lights
+ data: {}
+ - type: turn_off
+ device_id: bf45f1d630db6e2aa1307866603f548a
+ entity_id: light.smart_light
+ domain: light
+ off_click:
+ - type: turn_off
+ device_id: 4ca2827c57a086e0da4d63756b15261b
+ entity_id: switch.bedroom_tablelamp
+ domain: switch
+- id: '1654994043723'
+ alias: Aqara Sounds
+ description: ''
+ trigger:
+ - platform: state
+ entity_id:
+ - input_button.button_alert
+ - input_button.button_confirm
+ - input_button.button_ring
+ condition: []
+ action:
+ - choose:
+ - conditions:
+ - condition: template
+ value_template: '{{ trigger.entity_id == ''input_button.button_confirm'' }}'
+ sequence:
+ - service: alarm_control_panel.alarm_arm_night
+ data: {}
+ target:
+ entity_id: alarm_control_panel.aqara_hub_m1s_426c
+ - conditions:
+ - condition: template
+ value_template: '{{ trigger.entity_id == ''input_button.button_ring'' }}'
+ sequence:
+ - service: alarm_control_panel.alarm_arm_home
+ data: {}
+ target:
+ entity_id: alarm_control_panel.aqara_hub_m1s_426c
+ - delay:
+ hours: 0
+ minutes: 0
+ seconds: 5
+ milliseconds: 0
+ - conditions:
+ - condition: template
+ value_template: '{{ trigger.entity_id == ''input_button.button_alert'' }}'
+ sequence:
+ - if:
+ - condition: state
+ entity_id: input_boolean.mode_production
+ state: 'on'
+ then:
+ - service: alarm_control_panel.alarm_arm_away
+ target:
+ entity_id: alarm_control_panel.aqara_hub_m1s_426c
+ - delay:
+ hours: 0
+ minutes: 0
+ seconds: 15
+ milliseconds: 0
+ else:
+ - service: alarm_control_panel.alarm_arm_home
+ target:
+ entity_id: alarm_control_panel.aqara_hub_m1s_426c
+ - delay:
+ hours: 0
+ minutes: 0
+ seconds: 5
+ milliseconds: 0
+ default: []
+ - delay:
+ hours: 0
+ minutes: 0
+ seconds: 5
+ milliseconds: 0
+ - service: alarm_control_panel.alarm_disarm
+ data: {}
+ target:
+ entity_id: alarm_control_panel.aqara_hub_m1s_426c
+ mode: single
+- id: '1654996443007'
+ alias: 'Bedroom: BedSwitch'
+ description: ''
+ trigger:
+ - platform: device
+ domain: mqtt
+ device_id: f7f321e14489d5f5ef9e332f06055769
+ type: action
+ subtype: single_left
+ discovery_id: 0x54ef4410001b175a action_single_left
+ id: left
+ - platform: device
+ domain: mqtt
+ device_id: f7f321e14489d5f5ef9e332f06055769
+ type: action
+ subtype: single_right
+ discovery_id: 0x54ef4410001b175a action_single_right
+ id: right
+ - platform: device
+ domain: mqtt
+ device_id: f7f321e14489d5f5ef9e332f06055769
+ type: action
+ subtype: double_right
+ discovery_id: 0x54ef4410001b175a action_double_right
+ id: right_dbl
+ - platform: device
+ domain: mqtt
+ device_id: f7f321e14489d5f5ef9e332f06055769
+ type: action
+ subtype: double_left
+ discovery_id: 0x54ef4410001b175a action_double_left
+ id: left_dbl
+ - platform: device
+ domain: mqtt
+ device_id: f7f321e14489d5f5ef9e332f06055769
+ type: action
+ subtype: hold_right
+ discovery_id: 0x54ef4410001b175a action_hold_right
+ id: right_hold
+ - platform: device
+ domain: mqtt
+ device_id: f7f321e14489d5f5ef9e332f06055769
+ type: action
+ subtype: hold_left
+ discovery_id: 0x54ef4410001b175a action_hold_left
+ id: left_hold
+ condition: []
+ action:
+ - choose:
+ - conditions:
+ - condition: trigger
+ id: left
+ sequence:
+ - if:
+ - condition: and
+ conditions:
+ - condition: state
+ entity_id: switch.lights_bedroom
+ state: 'off'
+ - condition: numeric_state
+ entity_id: sensor.bedroom_bedsidelampsocket_power
+ below: '2'
+ then:
+ - parallel:
+ - type: turn_on
+ device_id: 4ca2827c57a086e0da4d63756b15261b
+ entity_id: switch.bedroom_tablelamp
+ domain: switch
+ else:
+ - parallel:
+ - service: script.turn_off_bedroom_lights
+ data: {}
+ - conditions:
+ - condition: trigger
+ id: left_dbl
+ sequence:
+ - if:
+ - condition: state
+ entity_id: input_boolean.mode_alone
+ state: 'off'
+ then:
+ - parallel:
+ - service: script.sleep_and_wake
+ data:
+ mode: sleep
+ target: office
+ else:
+ - parallel:
+ - service: switch.turn_off
+ data: {}
+ target:
+ entity_id:
+ - switch.lights_living
+ - switch.lights_guest
+ - switch.lights_temporary
+ - service: script.sleep_and_wake
+ data:
+ mode: hibernate
+ target: office
+ - service: input_button.press
+ data: {}
+ target:
+ entity_id: input_button.button_confirm
+ - conditions:
+ - condition: trigger
+ id: left_hold
+ sequence:
+ - service: input_button.press
+ data: {}
+ target:
+ entity_id: input_button.button_ring
+ enabled: false
+ - service: media_player.play_media
+ target:
+ entity_id: media_player.smartpi
+ data:
+ media_content_id: media-source://dlna_dms/asgard/:64$0$5$1$0$0
+ media_content_type: audio/mpeg
+ metadata:
+ title: Wish I Had An Angel
+ thumbnail:
+ media_class: music
+ children_media_class:
+ navigateIds:
+ - {}
+ - media_content_type: app
+ media_content_id: media-source://dlna_dms
+ - media_content_type: channel
+ media_content_id: media-source://dlna_dms/asgard/:0
+ - media_content_type: object.container.storageFolder
+ media_content_id: media-source://dlna_dms/asgard/:64
+ - media_content_type: object.container.storageFolder
+ media_content_id: media-source://dlna_dms/asgard/:64$0
+ - media_content_type: object.container.storageFolder
+ media_content_id: media-source://dlna_dms/asgard/:64$0$5
+ - media_content_type: object.container.storageFolder
+ 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: script.bedroom_aircon
+ data: {}
+ default:
+ - service: input_button.press
+ data: {}
+ target:
+ entity_id: input_button.button_confirm
+ mode: restart
+- id: '1655029337428'
+ alias: 'Alarms: Safety'
+ description: ''
+ trigger:
+ - type: moist
+ platform: device
+ device_id: 62b0726b0781074264bd1ba3a69de306
+ entity_id: binary_sensor.bathroom_leak_water_leak
+ domain: binary_sensor
+ - platform: device
+ type: turned_on
+ device_id: d070cf57873fde4d4eeeed45e0e72f4a
+ entity_id: switch.hall_smoke_alarm
+ domain: switch
+ - type: unsafe
+ platform: device
+ device_id: a40e83403ac69c75db53e21c88afd53b
+ entity_id: binary_sensor.kitchen_gas
+ domain: binary_sensor
+ condition: []
+ action:
+ - service: input_button.press
+ data: {}
+ target:
+ entity_id: input_button.button_alert
+ - service: notify.mobile_app_lm_g810
+ data:
+ title: SmartPI Alarm
+ message: Safety incidient
+ - service: notify.smartpi
+ data:
+ message: Safety incidient
+ mode: single
+- id: '1655032416924'
+ alias: 'Alarms: Wine Notification'
+ description: ''
+ trigger:
+ - type: opened
+ platform: device
+ device_id: 1ac71f2a54426da15458e5b5090f7603
+ entity_id: binary_sensor.kitchen_door_contact
+ domain: binary_sensor
+ condition: []
+ action:
+ - service: input_button.press
+ data: {}
+ target:
+ entity_id: input_button.button_ring
+ mode: single
+- id: '1655037280868'
+ alias: 'Alarms: Door-knock'
+ description: ''
+ trigger:
+ - platform: device
+ domain: mqtt
+ device_id: 65b9dbde95854b17f5e0e31545962734
+ type: action
+ subtype: vibration
+ discovery_id: 0x00158d0002b310d2 action_vibration
+ condition:
+ - type: is_no_motion
+ condition: device
+ device_id: 6deb0a6fb7a4a849ba22afc166cf9919
+ entity_id: binary_sensor.hall_motions_occupancy
+ domain: binary_sensor
+ - type: is_not_open
+ condition: device
+ device_id: b45b5a514dd669f9f4bb8ebdaa396998
+ entity_id: binary_sensor.entrance_door_contact
+ domain: binary_sensor
+ action:
+ - service: input_button.press
+ data: {}
+ target:
+ entity_id: input_button.button_ring
+ mode: single
+- id: '1655084794489'
+ alias: Telegram
+ description: ''
+ trigger:
+ - platform: event
+ event_type: telegram_command
+ condition: []
+ action:
+ - choose:
+ - conditions:
+ - condition: template
+ value_template: '{{ trigger.event.data.command == "/office_light" }} '
+ sequence:
+ - type: toggle
+ device_id: 95931a9049849e575f2de543adf111eb
+ entity_id: light.yeelight_color_0x7caaf86
+ domain: light
+ - conditions:
+ - condition: template
+ value_template: '{{ trigger.event.data.command == "/switch" }} '
+ sequence:
+ - if:
+ - condition: template
+ value_template: '{{ trigger.event.data.args|length == 1 }}'
+ - condition: template
+ value_template: '{{ states(trigger.event.data.args[0]) in ["on", "off",
+ "true", "false" ] }}'
+ then:
+ - service: notify.smartpi
+ data:
+ message: Toggling entity {{ trigger.event.data.args[0] }} from the current
+ state "{{ states(trigger.event.data.args[0]) }}"
+ - service: homeassistant.toggle
+ target:
+ entity_id: '{{ trigger.event.data.args }}'
+ else:
+ choose:
+ - conditions:
+ - condition: template
+ value_template: '{{ trigger.event.data.args|length != 1 }}'
+ sequence:
+ - service: notify.smartpi
+ data:
+ message: 'Wrong number of arguments for /switch command: {{ trigger.event.data.args
+ | length }}'
+ - conditions:
+ - condition: template
+ value_template: '{{ states(trigger.event.data.args[0]) in ["unknown"]
+ }}'
+ sequence:
+ - service: notify.smartpi
+ data:
+ message: 'Unknown entity: {{ trigger.event.data.args[0] }}'
+ default:
+ - service: notify.smartpi
+ data:
+ message: 'Entity {{ trigger.event.data.args[0] }} is in unsupported
+ state: {{ states(trigger.event.data.args) }}'
+ - conditions:
+ - 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")
+ }}
+ default:
+ - service: notify.smartpi
+ data:
+ message: 'Unsupported command: {{ trigger.event.data.command }} with params:
+ {{ trigger.event.data.args }}'
+ mode: single
+- id: '1672608894803'
+ alias: 'Hall: Camera Switch'
+ description: ''
+ use_blueprint:
+ path: lights/light_switch.yaml
+ input:
+ switch: switch.hall_lights_center
+ light: switch.hall_camera
+- id: '1672624569107'
+ alias: 'Hall: Entrance Combo'
+ description: ''
+ use_blueprint:
+ path: lights/light_switch_combo.yaml
+ input:
+ switch: switch.entrance_lights_right
+ master: switch.hall_lights_left
+ on_click: []
+ off_click: []
+ dblclick:
+ - service: script.sleep_and_wake
+ data:
+ mode: sleep
+ target: house
+ - service: input_button.press
+ data: {}
+ target:
+ entity_id: input_button.button_confirm
+ enabled: false
+- id: '1672627582279'
+ alias: 'Hall: Kitchen Combo'
+ description: ''
+ use_blueprint:
+ path: lights/light_switch_combo.yaml
+ input:
+ switch: switch.kitchen_lights_right
+ master: switch.hall_lights_left
+ on_click: []
+ off_click:
+ - service: switch.turn_off
+ data: {}
+ target:
+ entity_id:
+ - switch.entrance_lights_center
+ dblclick:
+ - service: switch.toggle
+ target:
+ entity_id:
+ - switch.entrance_lights_center
+ data: {}
+- id: '1672629824242'
+ alias: 'Hall: Away/Security Mode Switch'
+ description: ''
+ use_blueprint:
+ path: lights/light_switch.yaml
+ input:
+ switch: switch.hall_lights_right
+ light: input_boolean.mode_away
+ delay: 0
+ on_click:
+ - service: switch.turn_on
+ target:
+ entity_id: switch.hall_lights_center
+ - service: input_button.press
+ data: {}
+ target:
+ entity_id: input_button.button_confirm
+ post_action: []
+- id: '1672638756112'
+ alias: 'Alarms: Intrusion'
+ description: ''
+ use_blueprint:
+ path: camera/intrusion.yaml
+ input:
+ mode: input_boolean.mode_away
+ arm_delay: 15
+ disarm_delay: 5
+ sensors:
+ - binary_sensor.entrance_door_contact
+ - binary_sensor.hall_motions_occupancy
+ - switch.lights_bedroom
+ - switch.lights_living
+ camera_script:
+ - service: script.1672637427937
+ data: {}
+ script:
+ - parallel:
+ - service: input_button.press
+ data: {}
+ target:
+ entity_id: input_button.button_alert
+ - service: notify.mobile_app_lm_g810
+ data:
+ title: SmartPI Alarm
+ message: Intrusion detected
+ - service: notify.smartpi
+ data:
+ message: Intrusion detected
+- id: '1672677604586'
+ alias: 'Guestroom: Mode switch'
+ description: ''
+ use_blueprint:
+ path: lights/light_switch.yaml
+ input:
+ switch: switch.guestroom_lights_right
+ light: input_boolean.mode_guests
+ on_click:
+ - service: input_button.press
+ data: {}
+ target:
+ entity_id: input_button.button_confirm
+- id: '1672972431474'
+ alias: Knob Office Bulb Control
+ description: ''
+ use_blueprint:
+ path: lights/knob-bulb-control.yaml
+ input:
+ light: light.yeelight_color_0x7caaf86
+ knob: sensor.office_knob_action
+ toggle:
+ - type: toggle
+ device_id: 32787706a8ff87380633b7c817057935
+ entity_id: switch.living_tablelamp
+ domain: switch
+ brightness: input_number.knob_office_brightness0
+ temperature: input_number.knob_office_temperature0
+ hue: input_number.knob_office_hue0
+ state: input_boolean.state_office_knob_pressed
+- id: '1672979291802'
+ alias: Knob Multi-Bulb Control
+ description: ''
+ use_blueprint:
+ path: lights/knob-multi-bulb-control.yaml
+ input:
+ knob: sensor.office_knob_action
+ lights:
+ - light.yeelight_color_0x7caaf86
+ - light.smart_light
+- id: '1672987670623'
+ alias: 'Office: Dimming Button'
+ description: ''
+ use_blueprint:
+ path: lights/light_button.yaml
+ input:
+ button: sensor.office_button_action
+ light: light.yeelight_color_0x7caaf86
+ on_click:
+ - service: homeassistant.turn_off
+ data: {}
+ target:
+ entity_id: switch.lights_living_lustre
+ 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: homeassistant.toggle
+ data: {}
+ target:
+ entity_id: switch.lights_living_lustre
+ hold_delay: 500
+ state: input_boolean.state_office_button_pressed
+ hold:
+ - device_id: 95931a9049849e575f2de543adf111eb
+ domain: light
+ entity_id: light.yeelight_color_0x7caaf86
+ type: brightness_decrease
+- id: '1672989606410'
+ alias: 'Office: Button'
+ description: ''
+ use_blueprint:
+ path: lights/light_button.yaml
+ input:
+ button: sensor.office_button_action
+ light: light.yeelight_color_0x7caaf86
+ on_click:
+ - if:
+ - condition: state
+ entity_id: switch.smart_power_strip_pro_socket_1
+ state: 'off'
+ then:
+ - service: script.sleep_and_wake
+ data:
+ mode: wake
+ target: office
+ - service: homeassistant.turn_off
+ data: {}
+ target:
+ entity_id: switch.lights_living_lustre
+ 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: homeassistant.toggle
+ data: {}
+ target:
+ entity_id: switch.lights_living_lustre
+ hold_delay: 500
+ hold: []
+ longclick:
+ - if:
+ - condition: state
+ entity_id: switch.smart_power_strip_pro_socket_1
+ state: 'off'
+ then:
+ - service: script.sleep_and_wake
+ data:
+ mode: wake
+ target: office
+ else:
+ - parallel:
+ - service: switch.turn_off
+ data: {}
+ target:
+ entity_id: switch.lights_temporary
+ - if:
+ - condition: state
+ entity_id: input_boolean.mode_alone
+ state: 'on'
+ then:
+ - service: script.turn_off_bedroom_lights
+ data: {}
+ - if:
+ - condition: state
+ entity_id: input_boolean.mode_guests
+ state: 'off'
+ then:
+ - service: switch.turn_off
+ data: {}
+ target:
+ entity_id: switch.lights_guest
+ - service: input_button.press
+ target:
+ entity_id: input_button.button_confirm
+ data: {}
+- id: '1672991247298'
+ alias: 'Living: Light Sync'
+ description: ''
+ use_blueprint:
+ path: lights/light_sync.yaml
+ input:
+ master: switch.living_lights_left
+ slave: switch.living_lights_center
+- id: '1672991298090'
+ alias: 'Bedroom: Light Sync'
+ description: ''
+ use_blueprint:
+ path: lights/light_sync.yaml
+ input:
+ master: switch.bedroom_lights_left
+ slave: switch.bedroom_lights_center
+- id: '1673021522642'
+ alias: 'Motions: Kitchen'
+ description: ''
+ use_blueprint:
+ path: motion/motion_switch.yaml
+ input:
+ light_target:
+ - switch.kitchen_lights_left
+ - switch.kitchen_lights_center
+ motion_entity: binary_sensor.kitchen_motions_occupancy
+ illumination_test: sensor
+ illuminance_entity: sensor.kitchen_motions_illuminance_lux
+ lux_threshold: 30
+- id: '1673037015865'
+ alias: 'Motions: Night Light'
+ description: ''
+ use_blueprint:
+ path: motion/motion_switch.yaml
+ input:
+ light_target: []
+ motion_entity: binary_sensor.hall_motions_occupancy
+ illumination_test: sun
+ illuminance_entity: sensor.hall_motions_illuminance_lux
+ lux_threshold: 30
+ no_motion_wait: 5
+ on_click:
+ - if:
+ - condition: state
+ entity_id: input_boolean.mode_away
+ state: 'off'
+ - condition: state
+ entity_id: input_boolean.mode_alone
+ state: 'on'
+ - condition: state
+ entity_id: input_boolean.mode_bright
+ state: 'on'
+ then:
+ - type: turn_on
+ device_id: 5c1c363a6825ad5a006f3bb84bb104ce
+ entity_id: switch.hall_lights_left
+ domain: switch
+ else:
+ - type: turn_on
+ device_id: 87071fc9d8fb9ebbccb145f5642c7404
+ entity_id: light.aqara_hub_m1s_426c
+ domain: light
+ brightness_pct: 100
+ off_click:
+ - parallel:
+ - 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
+ domain: light
+ brightness_pct: 100
+- id: '1673153262822'
+ alias: 'Motions: Global '
+ description: ''
+ trigger:
+ - platform: state
+ id: home
+ entity_id:
+ - group.master_phones
+ from: not_home
+ to: home
+ for:
+ hours: 0
+ minutes: 1
+ seconds: 0
+ - platform: state
+ id: away
+ entity_id:
+ - group.master_phones
+ from: home
+ to: not_home
+ for:
+ hours: 1
+ minutes: 0
+ seconds: 0
+ - type: no_motion
+ platform: device
+ device_id: 6deb0a6fb7a4a849ba22afc166cf9919
+ entity_id: binary_sensor.hall_motions_occupancy
+ domain: binary_sensor
+ for:
+ hours: 24
+ minutes: 0
+ seconds: 0
+ id: empty_day
+ - type: no_motion
+ platform: device
+ device_id: 6deb0a6fb7a4a849ba22afc166cf9919
+ entity_id: binary_sensor.hall_motions_occupancy
+ domain: binary_sensor
+ for:
+ hours: 120
+ minutes: 0
+ seconds: 0
+ id: empty_week
+ - type: motion
+ platform: device
+ device_id: 6deb0a6fb7a4a849ba22afc166cf9919
+ entity_id: binary_sensor.hall_motions_occupancy
+ domain: binary_sensor
+ for:
+ hours: 0
+ minutes: 1
+ seconds: 0
+ id: motions
+ - platform: state
+ entity_id:
+ - input_boolean.mode_away
+ from: 'on'
+ to: 'off'
+ id: away_gone
+ condition: []
+ action:
+ - choose:
+ - conditions:
+ - condition: state
+ entity_id: input_boolean.mode_house_sleep
+ state: 'off'
+ - condition: or
+ conditions:
+ - condition: trigger
+ id: empty_day
+ - condition: and
+ conditions:
+ - condition: trigger
+ id: away
+ - condition: state
+ entity_id: input_boolean.mode_single
+ state: 'on'
+ - condition: state
+ entity_id: binary_sensor.hall_motions_occupancy
+ state: 'off'
+ for:
+ hours: 2
+ minutes: 0
+ seconds: 0
+ sequence:
+ - service: script.sleep_and_wake
+ data:
+ mode: sleep
+ target: house
+ - service: input_boolean.turn_on
+ data: {}
+ target:
+ entity_id: input_boolean.mode_house_sleep
+ - conditions:
+ - condition: trigger
+ id: empty_week
+ - condition: state
+ entity_id: input_boolean.mode_house_hibernate
+ state: 'off'
+ sequence:
+ - service: script.sleep_and_wake
+ data:
+ mode: hibernate
+ target: house
+ - service: input_boolean.turn_on
+ data: {}
+ target:
+ entity_id: input_boolean.mode_house_hibernate
+ - conditions:
+ - condition: trigger
+ id: home
+ sequence:
+ - service: input_boolean.turn_off
+ data: {}
+ target:
+ entity_id: input_boolean.mode_away
+ - conditions:
+ - condition: or
+ conditions:
+ - condition: state
+ entity_id: input_boolean.mode_house_sleep
+ state: 'on'
+ - condition: state
+ entity_id: input_boolean.mode_house_hibernate
+ state: 'on'
+ - condition: or
+ conditions:
+ - condition: and
+ conditions:
+ - condition: trigger
+ id: motions
+ - condition: state
+ entity_id: input_boolean.mode_away
+ state: 'off'
+ - condition: and
+ conditions:
+ - condition: trigger
+ id: away_gone
+ - type: is_motion
+ condition: device
+ device_id: 6deb0a6fb7a4a849ba22afc166cf9919
+ entity_id: binary_sensor.hall_motions_occupancy
+ domain: binary_sensor
+ sequence:
+ - if:
+ - condition: state
+ entity_id: input_boolean.mode_house_hibernate
+ state: 'on'
+ then:
+ - service: script.sleep_and_wake
+ data:
+ mode: wake
+ target: house
+ - service: input_boolean.turn_off
+ data: {}
+ target:
+ entity_id:
+ - input_boolean.mode_house_sleep
+ - input_boolean.mode_house_hibernate
+ default: []
+ mode: single
+- id: '1673156009695'
+ alias: 'Motions: Office'
+ description: ''
+ trigger:
+ - type: no_motion
+ platform: device
+ device_id: 6deb0a6fb7a4a849ba22afc166cf9919
+ entity_id: binary_sensor.hall_motions_occupancy
+ domain: binary_sensor
+ for:
+ hours: 2
+ minutes: 0
+ seconds: 0
+ id: sleep
+ condition: []
+ action:
+ - choose:
+ - conditions:
+ - condition: trigger
+ id: sleep
+ - condition: state
+ entity_id: switch.smart_power_strip_pro_socket_1
+ state: 'on'
+ sequence:
+ - service: script.sleep_and_wake
+ data:
+ mode: sleep
+ target: office
+ default: []
+ mode: single
+- id: '1673156130994'
+ alias: 'Hall: Kitchen Sync'
+ description: ''
+ trigger:
+ - platform: device
+ type: turned_off
+ 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
+ mode: single
+- id: '1673212686198'
+ alias: 'Office: Sven'
+ description: ''
+ trigger:
+ - platform: state
+ entity_id:
+ - switch.smart_power_strip_pro_socket_4
+ from: 'off'
+ to: 'on'
+ for:
+ hours: 0
+ minutes: 0
+ seconds: 4
+ condition: []
+ action:
+ - service: scene.turn_on
+ data: {}
+ target:
+ entity_id: scene.sven_power_switch
+ mode: single