The inverse helper allows you to invert the behavior of a switch or binary sensor entity. On becomes off, and off becomes on. 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 the switch or binary sensor (Yeah... they exist... π€¦ββοΈ).
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.
Inverting the behavior of an entityΒΆ
The inverse helper can be used to invert the behavior of a switch or binary sensor 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:
Or add one manually, using the following steps:
- From the Home Assistant sidebar, select Settings and next select Devices & Services.
- Select the Helpers tab.
- On the helpers page, in the bottom right corner, select the + Create helper button.
- From the list of helpers, select Inverse π».
- Select the type of entity you want to invert the behavior of.
- 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.
- Turn on Hide source entity, if you want to hide the source entity from the Home Assistant interface.
- Select Submit. Done! π