mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-25 02:07:15 +00:00
Adds light switch platform documentation (#7577)
* Adds light switch platform documentation * ✏️ Fixes a spelling issue * 🚑 Fixes example
This commit is contained in:
parent
04dae0cac2
commit
e94399fa08
46
source/_components/light.switch.markdown
Normal file
46
source/_components/light.switch.markdown
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
---
|
||||||
|
layout: page
|
||||||
|
title: "Light Switch"
|
||||||
|
description: "Instructions on how to set up a light switch within Home Assistant."
|
||||||
|
date: 2018-11-18 19:59
|
||||||
|
sidebar: true
|
||||||
|
comments: false
|
||||||
|
sharing: true
|
||||||
|
footer: true
|
||||||
|
ha_category: Light
|
||||||
|
ha_release: 0.83
|
||||||
|
ha_iot_class: "Local Push"
|
||||||
|
logo: home-assistant.png
|
||||||
|
ha_qa_scale: internal
|
||||||
|
---
|
||||||
|
|
||||||
|
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.
|
Loading…
x
Reference in New Issue
Block a user