Problem with my sensor door automation

Hi,
I have just installed my home assistant,
I installed my conbee2 and my sonoff door sensor
I have checked that on the Phoscon Web App page my sensor is working well
I then tried to do a very simple automation but every time I run it I get a sensor open notification while the sensor is closed.
Here is my configuration:

alias: room door
description: 'test'
trigger:
  - platform: state
    entity_id: binary_sensor.openclose_9
    from: 'off'
    to: 'on'
    for: '00:00:02'
action:
  - device_id: ec86112c0ed9af88865610088805d7aa
    domain: mobile_app
    type: notify
    title: Door open
    message: Door open
mode: single

Thank you for your help

Hi there… By running the automation, did you mean that you were pressing the RUN ACTIONS button on the automation page? If you are using the RUN ACTIONS button then the trigger is skipped and the actions are directly executed. So in this case the system wont check if the sensor is on or off but send a notification as given in actions. This function is for testing the actions part of automation. You can test if the automation is fully working by enabling the trigger i,e in this case opening the sensor. If this is not the case or you want any more help please do let us know.

Hi,
By using the execute button after having saved my Automation, I directly get a notification,
on the other hand when I open the door I have nothing, whereas in the Supervisor / deConz page it detects that my door is open …

Please check if the binary_sensor is in on when the door is open. You can do this in state tab of developer console.

I just reboot my Home Assistant and just after my automation works…
Thank you for help.

1 Like