#Lights automation not working

1 messages · Page 1 of 1 (latest)

obtuse isle
#

I currently have a sensor group that consists of a sensor for my gate, and two 'person' sensors from frigate.

I then have an automation which turns the light on if any of those sensors fire using a sensor group. I've noticed as of late that the automation works when the gate open but not anymore when a person is detected.

When checking the trace I'm seeing this, could someone please advise where to look to be able to diagnose what could be causing the issue?

#
alias: Veranda Motion-activated Light
description: ""
use_blueprint:
  path: aaron/motion_light.yaml
  input:
    motion_entity: binary_sensor.veranda_light_sensors
    light_target:
      device_id: 5cf6a3675cb0ca0e9fc195187eb6bd94
    additional_conditions:
      - condition: sun
        after: sunset
      - condition: device
        type: is_off
        device_id: 5cf6a3675cb0ca0e9fc195187eb6bd94
        entity_id: cd7c4fa7e9a9f0e4ac6bfa2444ae52e7
        domain: light
#

this is the sensor group helper

#

it's quite weird because duirng the time where the automation failed, the 'veranda light sensors' group did detect motion so logically everything is working fine i think?

obsidian thicket
#

I don't think the device in the condition is the same device as the log. As looking at the log that's a device_class: occupancy but in the automation the device is classified as beging from the light domain...

#

Tip, just switch to entity id and it's 100% verifiable if you're looking at the right entity.

abstract wing
#

Looking at the blueprint it doesn't supply any conditions itself, it only allows you to add conditions

#

so based on that, either it was before sunset, or the light in the device condition was on

#

Not sure where you're located, but you have to be quite north for a sunset before 5:14 PM

abstract wing
#

According to Gemini you need to be at 63⁰ North or higher

obtuse isle
#

@abstract wing this is the home assistant instance for my parents in South Africa, I'm in Australia hence why the times are weird

obtuse isle
obtuse isle
obsidian thicket
# obtuse isle this is the sensor group helper

This is clearly an occupancy sensor. But I see the blueprint does have it as input, missed that, sorry. But the motion is only used as a trigger.

And the trace is triggering, only the conditions where not true. So like @abstract wing said, or the light you have as condition was not off. Or @ 5:16 it was not yet passed sunset.

As I assume 6-8 time difference that's 9:16-11:16 AM in South Africa when it triggered. For which I assume it is NOT passed sunset yet 😄

obtuse isle
#

I’ve noticed that they might be causing the trace to think the light is on when it is in fact off

#

I’ll try using the entity instead of the device and see if that helps

#

Regarding the time, I think I added a screenshot for the wrong faulty scenario sorry but definitely happening when the sun is set and when the light is off so I’ll try setting the entity and hope for the best

obsidian thicket
#

I see the light in the condition is the light target. Only benefit is that the automation will not trigger if the light is already turned on.

But again, I suspect the sunset condition. As I would not expect 9:16 or 11:16 (AM) to be passed sunset 🙂 So maybe dive into the traces again 🙂 Then you can just look the states up.

obtuse isle
#

thank you @obsidian thicket