Hi,
I have two automations that manage the lights around my front door.
- The first turns the porch light on for two minutes when one of two sensors is triggered.
- The second turns on the inside light for two minutes, if a contact sensor on the door is triggered after the motion sensor outside is triggered.
The motion sensor outside is the only thing the two automations have in common.
When both rules are enabled and triggered, the memory usage within Home Assistant increases to 100% over about 30 minutes and my VM stops responding.
Disabling either automation stops this happening.
It’s almost like each automation is causing the other to loop, or something, but as mentioned, the only thing the two automations have in common are the sensors that trigger them,
The two automations are below. Does anyone have any theories about what might be going on?
Home Assistant is running on in a x64 vm using the supervised install.
HA version is 2024.4.3.
alias: Light - Front Door
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.front_door_sensor_state
- binary_sensor.front_door_contact_sensor
not_from:
- unknown
- unavailable
to: "on"
condition:
- condition: or
conditions:
- condition: sun
before: sunrise
- condition: sun
after: sunset
action:
- service: light.turn_on
data: {}
target:
entity_id: light.porch_light
- delay:
hours: 0
minutes: 2
seconds: 0
milliseconds: 0
- repeat:
sequence:
- service: light.turn_off
data: {}
target:
entity_id: light.porch_light
until:
- condition: and
conditions:
- condition: state
entity_id: binary_sensor.front_door_sensor_state
state: "off"
for:
hours: 0
minutes: 2
seconds: 0
- condition: state
entity_id: binary_sensor.front_door_contact_sensor
state: "off"
for:
hours: 0
minutes: 2
seconds: 0
mode: restart
alias: Light - Entry Way
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.front_door_contact_sensor
not_from:
- unknown
- unavailable
to: "on"
id: door
- platform: state
entity_id:
- binary_sensor.garage_sensor_state
to: "on"
id: garage
condition:
- condition: or
conditions:
- condition: sun
before: sunrise
- condition: sun
after: sunset
action:
- condition: or
conditions:
- condition: and
conditions:
- condition: trigger
id:
- door
- condition: state
entity_id: binary_sensor.front_door_sensor_state
state: "on"
- condition: and
conditions:
- condition: trigger
id:
- garage
- condition: state
entity_id: light.inside_lights
state: "off"
- service: light.turn_on
data: {}
target:
entity_id: light.entry_way_light
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- if:
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.front_door_contact_sensor
state: "on"
- condition: state
entity_id: binary_sensor.garage_sensor_state
state: "on"
then:
- service: automation.trigger
data:
skip_condition: true
target:
entity_id: automation.light_entry_way
else:
- service: light.turn_off
data: {}
target:
entity_id: light.entry_way_light
mode: restart