diff --git a/automations/maybe-an-earthquake.yaml b/automations/maybe-an-earthquake.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e50771658e23ea1c2e782a2ee270b6e257b2912d --- /dev/null +++ b/automations/maybe-an-earthquake.yaml @@ -0,0 +1,36 @@ +alias: Turn on all lights when all accelerometers move +trigger: + - platform: state + entity_id: binary_sensor.office_cabinet_door_motion + to: 'on' +condition: + condition: and + conditions: + - condition: state + entity_id: binary_sensor.front_door_motion + state: 'on' + - condition: state + entity_id: binary_sensor.slider_motion + state: 'on' + - condition: state + entity_id: binary_sensor.master_bedroom_window_motion + state: 'on' + - condition: state + entity_id: binary_sensor.dining_area_window_motion + state: 'on' + - condition: state + entity_id: binary_sensor.office_window_motion + state: 'on' +action: + - service: scene.turn_on + entity_id: + - scene.da_bright + - scene.lr_bright + - scene.office_bright + - scene.ericks_desk_lamp_relax + - scene.master_bedroom_bright + - scene.master_bath_bright + - scene.balcony_bright + - service: notify.jabber + data: + message: 'MAYBE AN EARTHQUAKE?!? ALL ACCELEROMETERS ARE ACTIVE.'