WTH is there no "invert boolean" helper for binary sensors

I know this is incredibly easy to to with a template, but for a new user it seems fairly daunting to start adding template sensors, so I propose a helper to invert binary sensors. Later this could potentially be expanded to creating entities for entity attributes for those cases where they’re still hanging around (the REST integration sensors can create a lot of those).

Simple example of where this is useful:
I create groups of various binary sensors (motion, door, etc.), but there are some rooms where the door being open should indicate a lack of occupancy and closed means it’s occupied. So now instead of being able to create a simple group for those rooms (as any of the sensors being on means occupied) I have to either create a template sensor for the door sensor, or a template sensor instead of the group.

This would be similar to the Switch as X helper in some ways.

We need inverters for many things. Probably an entire integration exposed as a helper, that inverts the following:

  • boolean entity_states
  • switch on/off actions
  • cover open/close & position
  • fan speed percent
12 Likes

Excellent idea!

2 Likes

I upvote this feature. It would be very useful for simply reversing a sensor. From time to time I have a sensor that’s wired the other way round.

I’ve created a custom component that inverts a switch from the UI (helper menu), it wouldn’t be difficult to make this available for a binary_sensor as well.

1 Like

Please also make this available for binary sensors…that would be great.

My exact use case, I was surprised to see this type of helper doesn’t exist.