home-assistant.io/source/_integrations/switch_as_x.markdown
2022-08-29 21:01:47 +02:00

1.5 KiB

title, description, ha_category, ha_release, ha_iot_class, ha_quality_scale, ha_domain, ha_config_flow, ha_codeowners, ha_platforms, ha_integration_type
title description ha_category ha_release ha_iot_class ha_quality_scale ha_domain ha_config_flow ha_codeowners ha_platforms ha_integration_type
Switch as X Instructions on how to convert any Home Assistant switch into something else.
Cover
Fan
Helper
Light
Lock
Siren
Switch
2022.4 Calculated internal switch_as_x true
@home-assistant/core
cover
fan
light
lock
siren
helper

The Switch as X integrations lets you convert any Home Assistant switch into a Home Assistant Light, Cover, Fan, Lock, or Siren.

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 Switch as X integration, you can convert those switches into the entity types that best matches your use case.

{% include integrations/config_flow.md name="Change device type of a switch" %} {% configuration_basic %} Switch entity: description: The switch entity you want to convert into something else. Type: description: The type of entity you want the switch to become. {% endconfiguration_basic %}

Switch as X from the existing entity

Where compatible, Switch as X will appear on entity properties. A list of entities can be found in {% my entities title="Settings -> Devices & Services -> Entities" %}.

Entity properties exampl