Automation - Sonoff RF Bridge and Door Sensor RF Device (Non-Flash)

Tags: #<Tag:0x00007f7811d305c8> #<Tag:0x00007f7811d30410>

Hello,

I have added a Sonoff RF Bridge to my Home Assistant via the ESPHome integration. I have not modified or flashed any custom FW such as Tasmota in the device.

It is shown as “Remote” with an icon and the “sonoff 10049b901” identifier.

I want to create an automation to toggle my Sonoff Basic Switch when my RF Device Door Sensor opens or changes state. In my eWelink account, my door sensor is named as “Door”. After reading some tutorials, I can determine the changing state of my Sonoff Remote when I close/open my Door sensor as shown below. It shows the state ‘on’ when I do so.

Using the Home Assistant Automation UI Editor, I created a simple automation. Afterwards, a few lines of codes were generated in my /config/automations.yaml file as shown below:

- id: '1590193583928'
  alias: New Automation
  description: ''
  trigger:
  - entity_id: remote.sonoff_100049b901
    from: 'on'
    platform: state
    to: 'on'
  condition: []
  action:
  - data: {}
    service: script.1590193360982

However, it did not perform the automation. Everytime I play with the door sensor, the script that is incorporated to my automation does not execute.

Furthermore, I tried to create another automation using the File Editor. I have created the following code but still, no luck. The automation does not work.

- alias: Door Detect
  trigger:
    entity_id: remote.sonoff_100049b901
    platform: event
    from: []
    event_type: sonoff.remote
    event_data:
      name: Door
  action:
  - data: {}
    service: switch.toggle
    entity_id: switch.sonoff_1000bb0a56

I watched a good tutorial video in YouTube with this link. At the 10:02 time mark, it started to show the Sonoff RF Bridge, same as my situation. I followed the code he discussed later on in the automations.yaml but it did not work on my side.

Can someone please help me with this issue? This seems pretty simple but I really had a hard time solving it. Thanks in advance!

-Jade

I have the exact same problem with my sensor and I did exactly the same thing.
The strange thing is that I also have the motion sensor and wireless simple switch and thy both work fine. Here is what I have

alias: Shed alarm
  description: ''
  trigger:
  - event_data:
      name: Motion sensor
    event_type: sonoff.remote
    platform: event
  action:
  - data: {}
    entity_id: light.bedroom , light.garden , light.shed , light.living_room
    service: light.turn_on

This works perfectly but If I put - Shed door - rather than Motion sensor
the automation doesn’t work and of course on the ewelink app the door sensor is called Shed door
Any ideas???

Sorry Jade for not being helpful myself :smile: