mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-16 05:46:52 +00:00
Add documentation for Switch as X (#22069)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
This commit is contained in:
parent
79120f901f
commit
b2984a11df
@ -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.
|
35
source/_integrations/switch_as_x.markdown
Normal file
35
source/_integrations/switch_as_x.markdown
Normal file
@ -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 %}
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user