home-assistant.io/source/_integrations/light.switch.markdown
Franck Nijhof 272086948a
Collection of domain & logo cleanups (#12299)
* Collection of domain & logo cleanups

* Fix build
2020-03-06 23:02:31 +01:00

1.1 KiB

title description ha_category ha_release ha_iot_class ha_quality_scale ha_domain
Light Switch Instructions on how to set up a light switch within Home Assistant.
Light
0.83 Local Push internal 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:

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.