Skip to content

Minimizing of the configuration sample (Light) #1024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion source/_components/light.enocean.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ To use your EnOcean device, you first have to set up your [EnOcean hub](/compone
# Example configuration.yaml entry
light:
- platform: enocean
name: Living_room
id: [0x01,0x90,0x84,0x3C]
sender_id: [0xFF,0xC6,0xEA,0x04]
```
Expand Down
9 changes: 2 additions & 7 deletions source/_components/light.flux_led.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,15 @@ To enable those lights, add the following lines to your `configuration.yaml` fil
# Example configuration.yaml entry
light:
- platform: flux_led
automatic_add: BOOLEAN
devices:
IP_ADDR_1:
name: CUSTOM_NAME_1
IP_ADDR_2:
name: CUSTOM_NAME_2
```

Configuration variables:

- **automatic_add** (*Optional*): To enable the automatic addition of lights on startup.
- **devices** (*Optional*): A list of devices with their ip address and a custom name to use in the frontend.

Example configuration:

### {% linkable_title Example configuration %}

Will automatically search and add all lights on start up:

Expand Down
2 changes: 0 additions & 2 deletions source/_components/light.hue.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ If you want to enable the light component directly, add the following lines to y
light:
platform: hue
host: DEVICE_IP_ADDRESS
allow_unreachable: true
filename: my_hue_hub_token.conf
```

Configuration variables:
Expand Down
10 changes: 6 additions & 4 deletions source/_components/light.hyperion.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ This platform allows you to integrate your [Hyperion](https://github.com/tvdzwan
```yaml
# Example configuration.yaml entry
light:
platform: hyperion
host: 192.168.1.98
# Optional
port: 19444
- platform: hyperion
```

Configuration variables:

- **host** (*Optional*): To enable the automatic addition of lights on startup.
- **port** (*Optional*): A list of devices with their ip address and a custom name to use in the frontend.
4 changes: 1 addition & 3 deletions source/_components/light.lifx.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ The `lifx` platform allows you to integrate your [LIFX](http://www.lifx.com) int
```yaml
# Example configuration.yaml entry
light:
platform: lifx
server: 192.168.1.98
broadcast: 192.168.1.255
- platform: lifx
```
Configuration variables:

Expand Down
9 changes: 1 addition & 8 deletions source/_components/light.limitlessled.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ha_iot_class: "Assumed State"
ha_release: pre 0.7
---

`limitlessled` can control your [LimitlessLED](http://www.limitlessled.com/) lights from within Home Assistant. The lights are also known as EasyBulb, AppLight, AppLamp, MiLight, LEDme, dekolight or iLight.
`limitlessled` can control your [LimitlessLED](http://www.limitlessled.com/) lights from within Home Assistant. The lights are also known as EasyBulb, AppLight, AppLamp, MiLight, LEDme, dekolight, or iLight.

### {% linkable_title Setup %}

Expand All @@ -27,22 +27,15 @@ light:
platform: limitlessled
bridges:
- host: 192.168.1.10
version: 5
port: 8899
groups:
- number: 1
type: rgbw
name: Bedroom
- number: 2
type: white
name: Craft Room
- number: 2
type: rgbw
name: Bathroom
- host: 192.168.1.11
groups:
- number: 1
type: rgbw
name: Living Room & Hall
```

Expand Down
87 changes: 52 additions & 35 deletions source/_components/light.mqtt.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -20,50 +20,18 @@ When a state topic is not available, the light will work in optimistic mode. In

Optimistic mode can be forced, even if state topic is available. Try to enable it, if experiencing incorrect light operation.

To enable a light with brightness and RGB support in your installation, add the following to your `configuration.yaml` file:

```yaml
# Example configuration.yml entry
light:
platform: mqtt
name: "Office Light RGB"
state_topic: "office/rgb1/light/status"
command_topic: "office/rgb1/light/switch"
brightness_state_topic: "office/rgb1/brightness/status"
brightness_command_topic: "office/rgb1/brightness/set"
rgb_state_topic: "office/rgb1/rgb/status"
rgb_command_topic: "office/rgb1/rgb/set"
state_value_template: "{% raw %}{{ value_json.state }}{% endraw %}"
brightness_value_template: "{% raw %}{{ value_json.brightness }}{% endraw %}"
rgb_value_template: "{% raw %}{{ value_json.rgb | join(',') }}{% endraw %}"
qos: 0
payload_on: "ON"
payload_off: "OFF"
optimistic: false
```

To enable a light with brightness (no RGB version) in your installation, add the following to your `configuration.yaml` file:

```yaml
# Example configuration.yml entry
light:
platform: mqtt
name: "Office light"
state_topic: "office/rgb1/light/status"
command_topic: "office/rgb1/light/switch"
brightness_state_topic: 'office/rgb1/light/brightness'
brightness_command_topic: 'office/rgb1/light/brightness/set'
qos: 0
payload_on: "ON"
payload_off: "OFF"
optimistic: false
- platform: mqtt
command_topic: "office/rgb1/light/switch"
```

Configuration variables:

- **command_topic** (*Required*): The MQTT topic to publish commands to change the switch state.
- **name** (*Optional*): The name of the switch. Default is 'MQTT Switch'.
- **state_topic** (*Optional*): The MQTT topic subscribed to receive state updates.
- **command_topic** (*Required*): The MQTT topic to publish commands to change the switch state.
- **brightness_state_topic** (*Optional*): The MQTT topic subscribed to receive brightness state updates.
- **brightness_command_topic** (*Optional*): The MQTT topic to publish commands to change the light's brightness.
- **rgb_state_topic** (*Optional*): The MQTT topic subscribed to receive RGB state updates.
Expand All @@ -81,5 +49,54 @@ Configuration variables:
Make sure that your topics match exact. `some-topic/` and `some-topic` are different topics.
</p>

## {% linkable_title Examples %}

In this section you find some real life examples of how to use this sensor.

### {% linkable_title Brightness and RGB support %}

To enable a light with brightness and RGB support in your installation, add the following to your `configuration.yaml` file:

```yaml
# Example configuration.yml entry
light:
- platform: mqtt
name: "Office Light RGB"
state_topic: "office/rgb1/light/status"
command_topic: "office/rgb1/light/switch"
brightness_state_topic: "office/rgb1/brightness/status"
brightness_command_topic: "office/rgb1/brightness/set"
rgb_state_topic: "office/rgb1/rgb/status"
rgb_command_topic: "office/rgb1/rgb/set"
state_value_template: "{% raw %}{{ value_json.state }}{% endraw %}"
brightness_value_template: "{% raw %}{{ value_json.brightness }}{% endraw %}"
rgb_value_template: "{% raw %}{{ value_json.rgb | join(',') }}{% endraw %}"
qos: 0
payload_on: "ON"
payload_off: "OFF"
optimistic: false
```

### {% linkable_title Brightness and no RGB support %}

To enable a light with brightness (no RGB version) in your installation, add the following to your `configuration.yaml` file:

```yaml
# Example configuration.yml entry
light:
platform: mqtt
name: "Office light"
state_topic: "office/rgb1/light/status"
command_topic: "office/rgb1/light/switch"
brightness_state_topic: 'office/rgb1/light/brightness'
brightness_command_topic: 'office/rgb1/light/brightness/set'
qos: 0
payload_on: "ON"
payload_off: "OFF"
optimistic: false
```

### {% linkable_title Implementations %}

A basic example using a nodeMCU board (ESP8266) to control its built-in led (on/off) can be found [here](https://github.com/mertenats/open-home-automation/tree/master/ha_mqtt_light). [Here](https://github.com/mertenats/open-home-automation/tree/master/ha_mqtt_rgb_light) is another example to control a RGB led (on/off, brightness and colors).

47 changes: 32 additions & 15 deletions source/_components/light.mqtt_json.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,35 @@ When a state topic is not available, the light will work in optimistic mode. In

Optimistic mode can be forced, even if state topic is available. Try enabling it if the light is operating incorrectly.

```yaml
# Example configuration.yaml entry
light:
- platform: mqtt_json
command_topic: "home/rgb1/set"
```

Configuration variables:

- **command_topic** (*Required*): The MQTT topic to publish commands to change the light's state.
- **name** (*Optional*): The name of the light. Default is "MQTT JSON Light."
- **state_topic** (*Optional*): The MQTT topic subscribed to receive state updates.
- **brightness** (*Optional*): Flag that defines if the light supports brightness. Default is false.
- **rgb** (*Optional*): Flag that defines if the light supports RGB colors. Default is false.
- **flash_time_short** (*Optional*): The duration, in seconds, of a "short" flash. Default is 2.
- **flash_time_long** (*Optional*): The duration, in seconds, of a "long" flash. Default is 10.
- **optimistic** (*Optional*): Flag that defines if the light works in optimistic mode. Default is true if no state topic defined, else false.
- **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages.

<p class='note warning'>
Make sure that your topics match exact. `some-topic/` and `some-topic` are different topics.
</p>

## {% linkable_title Examples %}

In this section you find some real life examples of how to use this sensor.

### {% linkable_title Brightness and RGB support %}

To enable a light with brightness and RGB support in your installation, add the following to your `configuration.yaml` file:

```yaml
Expand All @@ -51,6 +80,8 @@ light:
rgb: true
```

### {% linkable_title Brightness and no RGB support %}

To enable a light with brightness (but no color support) in your installation, add the following to your `configuration.yaml` file:

```yaml
Expand All @@ -63,20 +94,6 @@ light:
brightness: true
```

Configuration variables:

- **name** (*Optional*): The name of the light. Default is "MQTT JSON Light."
- **state_topic** (*Optional*): The MQTT topic subscribed to receive state updates.
- **command_topic** (*Required*): The MQTT topic to publish commands to change the light's state.
- **brightness** (*Optional*): Flag that defines if the light supports brightness. Default is false.
- **rgb** (*Optional*): Flag that defines if the light supports RGB colors. Default is false.
- **flash_time_short** (*Optional*): The duration, in seconds, of a "short" flash. Default is 2.
- **flash_time_long** (*Optional*): The duration, in seconds, of a "long" flash. Default is 10.
- **optimistic** (*Optional*): Flag that defines if the light works in optimistic mode. Default is true if no state topic defined, else false.
- **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages.

<p class='note warning'>
Make sure that your topics match exact. `some-topic/` and `some-topic` are different topics.
</p>
### {% linkable_title Implementations %}

A full example of custom lighting using this platform and an ESP8266 microcontroller can be found [here](https://github.com/corbanmailloux/esp-mqtt-rgb-led). It supports on/off, brightness, transitions, RGB colors, and flashing.
6 changes: 3 additions & 3 deletions source/_components/light.osramlightify.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ The `osramlightify` platform allows you to integrate your [Osram Lightify](http:
```yaml
# Example configuration.yaml entry
light:
platform: osramlightify
host: 192.168.0.50
- platform: osramlightify
host: 192.168.0.50
```
Configuration variables:

- **host** (*Required*): IP address of the Osram Lightify bridge, eg. `192.168.1.50`
- **host** (*Required*): IP address of the Osram Lightify bridge, eg. `192.168.1.50`.

13 changes: 6 additions & 7 deletions source/_components/light.rfxtrx.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,22 @@ ha_release: 0.7.5
The `rfxtrx` platform support lights that communicate in the frequency range of 433.92 MHz.

First you have to set up your [rfxtrx hub](/components/rfxtrx/).

The easiest way to find your lights is to add this to your `configuration.yaml`:

```yaml
light:
platform: rfxtrx
automatic_add: True
- platform: rfxtrx
automatic_add: True
```

Launch your homeassistant and go the website.
Push your remote and your device should be added:
Launch your Home Assistant and go the website. Push your remote and your device should be added:

<p class='img'>
<img src='/images/components/rfxtrx/switch.png' />
</p>

Here the name is `0b11000102ef9f210010f70` and you can verify that it works from the frontend.
Then you should update your configuration to:
Here the name is `0b11000102ef9f210010f70` and you can verify that it works from the frontend. Then you should update your configuration to:

```yaml
light:
Expand All @@ -58,5 +57,5 @@ Configuration variables:

- **devices** (*Required*): A list of devices with their name to use in the frontend.
- **automatic_add** (*Optional*): To enable the automatic addition of new lights.
- **signal_repetitions** (*Optional*): Because the rxftrx device sends its actions via radio and from most receivers it's impossible to know if the signal was received or not. Therefore you can configure the switch to try to send each signal repeatedly.
- **signal_repetitions** (*Optional*): Because the RFXtrx device sends its actions via radio and from most receivers it's impossible to know if the signal was received or not. Therefore you can configure the switch to try to send each signal repeatedly.
- **fire_event** (*Optional*): Fires an event even if the state is the same as before. Can be used for automations.
7 changes: 3 additions & 4 deletions source/_components/light.x10.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ To enable those lights, add the following lines to your `configuration.yaml` fil
light:
- platform: x10
devices:
- name: Living Room Lamp
id: a2
- name: Bedroom Lamp
id: a3
- id: a2
- id: a3
name: Bedroom Lamp
```

Configuration variables:
Expand Down
6 changes: 2 additions & 4 deletions source/_components/light.zigbee.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ light:
- name: Desk Lamp
platform: zigbee
pin: 0
address: 0013A20040791FA2
on_state: low
```

Configuration variables:

- **name** (*Required*): The name you' would like to give the light in Home Assistant.
- **pin** (*Required*): The number identifying which pin to use.
- **address**: The long 64 bit address of the remote ZigBee device whose digital output pin you wouldd like to switch. Do not include this variable if you want to switch the local ZigBee device's pins.
- **on_state**: Either `high` (default) or `low`, depicting whether the digital output pin is pulled `high` or `low` when the light is turned on.
- **address** (*Optional*): The long 64 bit address of the remote ZigBee device whose digital output pin you wouldd like to switch. Do not include this variable if you want to switch the local ZigBee device's pins.
- **on_state** (*Optional*): Either `high` (default) or `low`, depicting whether the digital output pin is pulled `high` or `low` when the light is turned on.