Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Helpers

Inverse

Stranger Things, the upside down πŸ™ƒ

The inverse helper allows you to invert the behavior of a switch, binary sensor, cover, or valve entity. On becomes off, and off becomes on. Open becomes closed. The world is upside down!

This can be helpful if you use a switch or binary sensor in a non-standard way, or when the manufacturer of a device has decided to use the opposite logic for it (Yeah... they exist... πŸ€¦β€β™‚οΈ). Blinds with the motor mounted on the other side, a projector screen that opens by coming down: same story.

It not just inverts the state of the source entity, but also does all actions in reverse. So if you have an automation performing the turn on action on a switch, it will instead perform the turn off action on the inverted switch.

What can be invertedΒΆ

A light inverted as a switch is only on or off: its brightness, colors and effects stay with the light itself.

Inverting a coverΒΆ

A cover can be backwards in two ways, and the inverse helper lets you turn around either one, or both:

The position decides whether the inverted cover is closed, not the state of the source. A cover counts as closed only at exactly 0%, and as open at anything above that. So the inverted cover is closed only when the source is all the way open. A cover that cannot report its position only knows open or closed, and has just that turned around.

Inverting a valveΒΆ

A valve works the same way as a cover, without the tilt: opening becomes closing, a position becomes its opposite, and the inverted valve is closed only when the source is all the way open. There are no extra options, as a valve only moves one way.

Inverting the behavior of an entityΒΆ

The inverse helper can be used to invert the behavior of a switch, binary sensor, cover, or valve entity.

Don’t worry! This is really easy and all fully done via the Home Assistant user interface.

Add one directly to your own instance by selecting the My Home Assistant button below:

Open your Home Assistant instance and start setting up a new integration.

Or add one manually, using the following steps:

  1. From the Home Assistant sidebar, select Settings and next select Devices & Services.

  2. Select the Helpers tab.

  3. On the helpers page, in the bottom right corner, select the + Create helper button.

  4. From the list of helpers, select Inverse πŸ‘».

Screenshot of the add helper dialog, which lists the inverse helper.
  1. Select the type of entity you want to invert the behavior of.

Screenshot of the inverse helper dialog, which allows you to select the type of entity to invert.
  1. Provide a name for your new inverted entity this helpers provides, and select the entity you want to invert the behavior of in the Source entity field.

  2. Turn on Hide source entity, if you want to hide the source entity from the Home Assistant interface.

Screenshot of the inverse helper dialog, configuring the new inverted entity.
  1. Select Submit. Done! πŸŽ‰

Screenshot showing the newly inverted switch, created with the procedure described above.