Manual operation that temporarily stops automation

I have been looking for the right solution for a long time and all I find is just not.

I have a switch that I use a motion sensor and that works.

Now I would like, when the lamp is switched on manually or with Google Home, that it stays on. So that the lamp does not switch off with the automation with the motion sensor.

As soon as I turn the lamp off manually again, the lamp then continues on the motion sensor via the automation.

I now use the following: https://pastebin.com/nudmHxbm

sound to me like you need one automazion instead of two.

  • IF Motion is true and switch is off then power on switch wait xxx and power switch off

Thanks for your quick response. Yes, that sounds exactly what I need. Am still a beginner with the automations.

Have added a link, do you have an idea how I can do that?

i would just try (means untestet) something like that

  condition:
  - condition: time
    after: 17:00:00
    before: '23:59:00'
  - condition: state
    entity_id:  light.kamerlamp
    state: 'OFF'
  action:
  - delay: '60'
  - entity_id:  light.kamerlamp
    service: light.turn_off

My own approach uses an input boolean controlled by the automation. When the light is turned on automatically, it turns on the boolean. The light is only turned off automatically if the boolean is on.

That avoids any fixed delay, and means that the light turns off X minutes after the last activity.

This is fantastic, this is exactly what I was looking for. It works perfectly! Thank you for the very quick and correct answers. More people will indeed have problems with this. I am sure that with this topic several people have been helped. Thanks again.