automation: - alias: mailbox_mail_received mode: single trigger: - device_id: ca819ab69f4c9e16861daf8ffacdd10e entity_id: binary_sensor.mailbox_motion_iaszone domain: binary_sensor platform: device type: motion condition: - type: is_not_open condition: device device_id: 6649a68ae459ea3e7f61eb4155ffe23d entity_id: binary_sensor.mailbox_door_iaszone domain: binary_sensor action: - service: notify.notify data: title: Post message: ist da. - service: switch.turn_on target: entity_id: switch.mailbox - service: scene.create data: scene_id: before snapshot_entities: - light.office_bulb - delay: seconds: 2 - service: scene.create data: scene_id: after snapshot_entities: - switch.adaptive_lighting_default - service: switch.turn_off target: entity_id: switch.adaptive_lighting_default - service: light.turn_on target: entity_id: light.office_bulb data: color_name: blue - delay: seconds: 15 - service: scene.turn_on target: entity_id: scene.before - delay: seconds: 1 - service: scene.turn_on target: entity_id: scene.after