cancel
Showing results for 
Search instead for 
Did you mean: 

Automation only works when Home app is open

jkane001
Community Member

I have an automation that turns lights on at night when motion is detected in an area. That automation works fine. I also have an automation that turns those same lights off when no movement is detected. That one does not work - unless I open the home app, and then it suddenly works. The script is posted below.

The motion detector is an Aqara Presence Sensor FP2. Is there a reason the lack of motion doesn't trigger when the Home app is not active?

------

metadata:

  name: Bathroom walk lights

  description: Turn on the under-bed lighting when someone's going to the bathroom during the night

 

automations:

  - starters:

      - type: device.state.MotionDetection

        device: Bathroom walk - Master Bedroom

        state: motionDetectionEventInProgress

        isNot: true

 

    actions:

      - type: device.command.OnOff

        devices: Bed Lights - Master Bedroom

        on: false

 

  - starters:

      - type: device.state.MotionDetection

        device: Bathroom walk - Master Bedroom

        state: motionDetectionEventInProgress

        is: true

 

    condition:

      type: and

      conditions:

        - type: device.state.OnOff

          device: Master Bedroom TV - Master Bedroom

          state: on

          is: false

        - type: device.state.OnOff

          device: Bed Lights - Master Bedroom

          state: on

          is: false

        - type: time.between

          after: 12:00 AM

          before: sunrise

 

    actions:

      - type: device.command.ColorAbsolute

        devices: Bed Lights - Master Bedroom

        color:

          name: barbie pink

 

      - type: device.command.BrightnessAbsolute

        brightness: 20

        devices: Bed Lights - Master Bedroom

 

 

2 REPLIES 2

Kidibul
Community Member

There are other users with the same problem, check also this thread: https://www.googlenestcommunity.com/t5/Home-Automation/Automations-only-start-after-I-open-the-Home-...

My Philips Hue sensors are working fine without opening the home app.

PeterHammer
Community Member

Here same problem. I have an ewelink light and a tuya switch. I want the switch to control the light via Google Home, but it only works 70% of the time, the other 30% I have to open the app in my phone, I just doing that makes the automation work. As if it was executed from the phone and not the servers, and the app was sleeping. Wierd. Google Home is such a let down.