Some binary_switch, automation and general questions

Hi All,

I’m trying to configure this custom alarm project to work with SONOFF RF bridge and SONOFF DW1 door detectors and PIR2 motion detector.
The problem is DW1 only reports when the door opens, but it generates nothing when it closes.
It is treated as switch/relay by RF bridge, but all I need is a single notification to the alarm system “Door is open”.
I ended up creating this for the detector
binary_sensor:

  • platform: mqtt
    name: “Front door detector”
    sensor_class: opening
    state_topic: ‘SRFB/relay/6’
    payload_on: ‘1’
    payload_off: ‘0’
    payload_available: “1”
    payload_not_available: “0”
    initial: off

and some automation to toggle it back
- id: auto_toggle_front_door_detector_state_off
alias: Automatically toggle sensor’s state back to OFF after 1 sec
initial_state: on
hide_entity: true
trigger:

  • platform: state
    entity_id: binary_sensor.front_door_detector
    from: ‘off’
    to: ‘on’
    for:
    seconds: 1
    action:
    service: mqtt.publish
    data:
    topic: ‘SRFB/relay/6/set’
    payload: ‘2’

It works, but I want to hide that Front door detector sensor from the screen completely - how can I do that?

And I will have 6 PIRs (similar description, just different relay numbers) and some more DW1s - do I need to create a description and automation for any of them separately, or there is a workaround?

Also, it was VERY hard to get the idea what platforms/services to use, and what parameters are available when I define binary_sensor, for example.

Is there a comprehensive info about it? I use Docs, but it’s very brief and sometimes there are sections that are not linked to the main directory, so it’s impossible to find them looking at the list of topics.

The documentation for individual components is in the components section. For instance, your binary_sensor is documented here

There is a search facility, but you can also search the site documentation and forums using an external search engine with a link such as

https://duckduckgo.com/?q=site%3Awww.home-assistant.io&ia=web

Unfortunately, documentation on MQTT Binary Sensor gives no information on how to hide that component from the pane. I don’t want to sound rude to my fellow members and HA developers/contributors, but the documentation is patchy and far from perfect, it is hard to use it if you have no previous knowledge on the subject. More like developers’ notes, not user manual/guide I was asking about.
I kind of know about search and tend to use it before asking, but to get the right answer one need to ask the right question. And as my knowledge is still limited, I just might not know what to search for.
Nevermind

All visuals and UI customizations are in the customize section:

You’re looking for hidden in the customize section.

If you are trying to search any forum, chances are the forum’s search functionality are terrible. It’s not just this forum, it’s pretty much all forums / websites. I always go to google and search for my key words there with the tag “site:home-assistant.io” at the end. You’ll use googles search algorithm on home assistants site.

Also, as for the documentation, you should start at getting started and move your way through. Entity customization is one of the first sections you encounter.

1 Like

In customize.yaml:

entity_id: binary_sensor.front_door_detector:
hidden: true
#(indent second line 2 spaces)

Hi AhmadK,

Coud you please provide config for automation, i cannot get it to work if i just copy them, perhaps in https://pastebin.com/?