From b2984a11df5feb86a6ee1105cff7d93a76e17bfe Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Mon, 21 Mar 2022 13:25:48 +0100 Subject: [PATCH] Add documentation for Switch as X (#22069) Co-authored-by: Erik Montnemery --- source/_integrations/light.switch.markdown | 41 ---------------------- source/_integrations/switch_as_x.markdown | 35 ++++++++++++++++++ source/_redirects | 1 + 3 files changed, 36 insertions(+), 41 deletions(-) delete mode 100644 source/_integrations/light.switch.markdown create mode 100644 source/_integrations/switch_as_x.markdown diff --git a/source/_integrations/light.switch.markdown b/source/_integrations/light.switch.markdown deleted file mode 100644 index 4b6457b8c51..00000000000 --- a/source/_integrations/light.switch.markdown +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: "Light Switch" -description: "Instructions on how to set up a light switch within Home Assistant." -ha_category: - - Light -ha_release: 0.83 -ha_iot_class: Local Push -ha_quality_scale: internal -ha_domain: light ---- - -The light switch platform lets you control an existing switch, allowing you -to use a switch like a light in Home Assistant. - -In Home Assistant's world, a wall plug is a switch. This platform allows you -to expose this switch as a light source, allowing you to add, e.g., the wall -plug controlling your Christmas Tree, to be part of a light group. - -To enable this platform in your installation, add the following to your -`configuration.yaml` file: - -```yaml -light: - - platform: switch - name: Christmas Tree Lights - entity_id: switch.christmas_tree_lights -``` - -{% configuration %} - name: - description: The name of the light switch. - required: false - type: string - default: Light Switch - entity_id: - description: "The `entity_id` of a switch entity to control as a light source." - required: true - type: string -{% endconfiguration %} - -A light switch only supports turning on/off a light. diff --git a/source/_integrations/switch_as_x.markdown b/source/_integrations/switch_as_x.markdown new file mode 100644 index 00000000000..7b976865492 --- /dev/null +++ b/source/_integrations/switch_as_x.markdown @@ -0,0 +1,35 @@ +--- +title: "Switch as X" +description: "Instructions on how to convert any Home Assistant switch into something else." +ha_category: + - Cover + - Fan + - Light + - Lock + - Siren + - Switch +ha_release: 2022.4 +ha_iot_class: Local Push +ha_quality_scale: internal +ha_domain: switch_as_x +ha_config_flow: true +--- + +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 %} +{% 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 %} diff --git a/source/_redirects b/source/_redirects index b217b733765..20a1fcd6df8 100644 --- a/source/_redirects +++ b/source/_redirects @@ -170,6 +170,7 @@ /integrations/generic_ip_camera /integrations/generic /integrations/google /integrations/google_translate /integrations/input_slider /integrations/input_number +/integrations/light.switch /integrations/switch_as_x /integrations/openalpr /integrations/openalpr_local /integrations/pca /integrations/elv /integrations/pollen /integrations/iqvia