WTH is there no easy way to reverse/invert a binary sensor

It happens every now and then that binary sensors of entities are inverted (open is close, on is off). To fix this you always have to made a complety new entity, which is a bit messy, because you get the same entity twice and have to write a entity manually. So I would really like to have an option / a switch wich just switch the on and off state of a binary sensor

This has been noticed in similar WTH

1 Like

What is an example? That sounds like a bug in the integration that provides the binary sensor.

MY first thought… BLINDS! I just heard someone complaining about that. Seems like the most common instance to me.

1 Like

In a sliding door, or a garage door, I might wanna have a sensor to detect when the door is fully opened, as there is an interval where the door is opening (neither closed or fully opened). An additional door sensor could easily do the job, however when that sensor is triggered it would report the door as “closed”, as this is the standard behaviour for door sensors when the magnet attached to the door is detected, but for clarity on my system, I’d like that sensor to be inverted and show door opened.
I have also a similar issue with my DIY bed presence sensor (again a door sensor used in a diferent use case).


I’ve created a custom component that inverts a switch from the UI (helper menu). I could add the ability to include binary_sensors, and covers.

1 Like

Example: I wanted to use an Aqara water leak sensor to wire up a reed sensor to be a door sensor. The leak sensor is set to be normally open, but a door sensor is set to be normally closed.

After attaching the reed sensor to the Aqara leak sensor, when the magnet is next to the sensor it shows the door is open and when the magnet is away the sensor shows the door as closed.

I really wish there was a checkbox or toggle to invert the state of the binary sensor vs having to create a template sensor.

Install Spook from HACs, you can invert an entity.