Change device type of a switch

The Change device type of a switch helper integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] lets you convert any Home Assistant switch into a Home Assistant Light, Cover, Fan, Lock, Siren, or Valve.

In Home Assistant’s world, a wall plug is a switch. And while that is correct for a wall plug in general, those plugs are often used with e.g, a light fixture or a fan. General-purpose relays are similar, as they are sometimes used for things like locks or garage doors.

Using the Change device type of a switch helper integration, you can convert those switches into the entity types that best matches your use case.

Configuration

To add the Switch as X helper to your Home Assistant instance, use this My button:

Manual configuration steps

If the above My button doesn’t work, you can also perform the following steps manually:

  • Browse to your Home Assistant instance.

  • Go to Settings > Devices & services.

  • At the top of the screen, select the tab: Helpers.

  • In the bottom right corner, select the Create helper button.

  • From the list, select Switch as X.

  • Follow the instructions on screen to complete the setup.

Switch entity

The switch entity you want to convert into something else.

Type

The type of entity you want the switch to become.

Change device type of a switch from the existing entity

Where compatible, Change device type of a switch will appear on entity properties. A list of entities can be found in Settings > Devices & services > Entities.

Entity properties example

Name of the new entity

The new entity belongs to the same deviceA device is a model representing a physical or logical unit that contains entities. as the switch, and it gets the same name as the switch. If you renamed the switch, the new entity gets your name too.

Like other entities of a device, the new entity is shown with the device name in front of its own name. If the entity name repeats the device name, you see it twice. For example, if the device is called Plug lamp XYZ and you name the new entity Lamp XYZ, it’s shown as Plug lamp XYZ Lamp XYZ.

To avoid this, choose one of these options:

  • Rename the device to what the switch controls, for example Lamp XYZ, and give the entity a name that only adds what’s missing, or no name.
  • Keep the device name and give the entity a short name for what’s connected, for example Lamp. It’s then shown as Plug lamp XYZ Lamp.

For more about how names are built, see Entity and card naming.