UPDATE: THE GUIDE BELOW IS VALID FOR ONE BRIDGE ONLY.
SCROLL DOWN TO THE 2ND POST FOR THE CHANGES NEEDED FOR MULTIPLE BRIDGES
Finally found a solution to my problem so I ll post it here. Although it may not be as good, coding-wise (I m no YAML expert by any means), it just works and it is a simple solution to monitor your door sensors that any user with a basic understanding of the whereabouts of HA will be able to follow.
Requirements:
- Mosquito broker add-on, setup and running on your installation
- Sonoff LAN add-on from AlexxIT, installed through HACS
- Sonoff RF Bridge (Installed and paired throuh the ewelink app on your phone)
- GS WDS07 door/windows sensors
Steps:
-
Once we pair the Sonoff RF Bridge to our mobile application, we select the Bridge and add our sensors twice as an alarm.
Tap on your bridge name, then on the add (+) icon on the bottom right and then âAlarmâ. The Bridge will beep and you can move your magnet away from the sensor, thus registering the âOPENâ state of your sensor. Give it a friendly name âDoor 1 openâ for example and click on the (+) sign again, select Alarm and when your bridge beeps, bring your magnet in contact with your sensor thus registering the CLOSE state. Give it a friendly name like âDoor 1 Closedâ and keep on adding sensors until you are done. -
We go on to our Home Assistantâs File Editor and we rename .sonoff.json (there is a dot before sonoff) to sonoffback.json. (You can just delete it but I prefer the safe way)
-
Configuration, Server Controls, Check config, Restart Home Assistant
-
Now we need to edit our configuration.yaml file by adding the binary sensors one by one like in the picture below

Device Class can be door, window, opening etc. Choose whatâs best for you.
Name is your entity name by which you will see the sensor in your UI
state topic is something descriptive for your specific application, it could be anything like basement/rfbridge1/window or anything that you like
payload on and off is again free for you to choose whatever you like, as long as you remember it. 
-
Depending on the order by which we introduced the sensors and their respective states to the ewelink app there will be a âcommandâ portion that is sent to home assistant through our rf bridge.
For example.
We first paired the open state of our door 1 sensor with the app. This was command 0
We then paired the close state of our door 1 sensor with the app. This would be command 1
Then the open state of our second door sensor, that would be command 2 and so on and so forth -
Go on to Developer Tools -> States and scroll down to your sonoff bridge which will be named something like sonoff.remote_xxxxxxxxxxx
Grab one of your sensors at a time and watch the state change and the command shown as you close the contact or move it away.
The command shown in each case (open and close) is the number you have to write down in order to move on to the next step and create an automation.
- Now we will create automations that will take this command portion and translate it into an mqtt message that we can use, in order to create a meaningfull lovelace card with the door states.
(I am 100% sure that there is a better coding way to do this, but as I have said, I m no expert in this, just an enthusiast like so many others out there)
You need to create two automations for each sensor, one for the closed state and one for the open state, like in my example below
Be careful not to make any mistakes in the topic and payload values as they will have to be exactly the same as the ones you typed down in your configuration.yaml file, when you created your binary sensor.
- When you are done, restart Home Assistant.
Create a lovelace glance card.
You will see your enitites(the ones you created in your configuration.yaml file listed with their respective names.
Once you re done open the visual code editor, if you prefer to change your icons to something other than the default that comes with device class, manually, like so. (Be careful with your identation)

Enjoy your unflashed/untasmotized door/window state view.

[Updated to include a better image]






Whatâs the point in having a sensor that only detects when openâŚ

