#Timer for lack of motion does not execute

1 messages · Page 1 of 1 (latest)

digital elk
#

After reading through the Automation docs, trying to understand everything, I came here to search. There are a few great posts here that I'm already copying some config from to rebuild mine.

I built this configuration and ran it through GPT for some sort of a double check.
https://dpaste.org/rkSTZ

Using an Aqara FP1E with the Motion entity, it properly detects motion and turns the lights up to 70%.
However, it does not return to 10% after the allotted 3 minutes.

My goal here is to have the lights at 10% consistently.
Turn up to 70% if someone enters the bathroom, and stay that way as long as there is motion or presence.
Then return to 10% after the person leaves.
I also tried to implement something that says, if I have manually changed the lights, to wait for an hour and then return to 10%.

Something is wrong with this configuration, and I still can't determine if I want to use Motion or Presence. Just need a sanity check here.

gritty current
#

Hello @digital elk,
It looks like you trigger on any state change to movement, and another trigger that will trigger if you have 5 minutes of movement which is redundant and another if a light brightness is adjusted.
What is going to tell it that the 3 minutes is over or there is no movement or any of that? It just doesn't know.

#

No trigger for that.

digital elk
#

It's supposed to be FROM 'movement', not to. If the state changes from 'movement' to anything else, kick off the timer and then dim the lights.

#

Did I get that wrong?

gritty current
#

Let me look again.

digital elk
#
  - entity_id:
      - sensor.aqara_fp1e_bathroom_movement
    for:
      hours: 0
      minutes: 3
      seconds: 0
    trigger: state
    from: movement

This section here.

gritty current
#

yup, saw it, looks ok.

#

You add another 3 minute delay in yyour choose condition, I would drop that and just condition on the state that it is no_presence there.

#

I see this.
The second condition, generically, I read that if it is no presence or if the light is off or the brightness is low, turn the light on. Is that what you want?

digital elk
#

hm. i see it now that you say it like that, looks like i got the state reversed maybe

gritty current
#

Here's how I do automations.
Take a piece of paper and flow chart what you want to happen. This keeps your thoughts in line. then build the automation and at the end, compare the flow chart with the yaml code and see it it matches.

digital elk
#

good idea.

#

I have some other notes for a rebuild, but i'm taking a break 😂

#

thanks for the look!