This commit is contained in:
Fabian Affolter 2018-04-15 19:02:38 +02:00
parent 429040954a
commit 0b5ee4d0c4
No known key found for this signature in database
GPG Key ID: DDF3D6F44AAB1336

View File

@ -204,6 +204,7 @@ In this section you will find some real life examples of how to use this sensor.
To enable a light with brightness and RGB support in your installation, add the following to your `configuration.yaml` file:
{% raw %}
```yaml
# Example configuration.yml entry
light:
@ -215,14 +216,15 @@ light:
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 %}"
state_value_template: "{{ value_json.state }}"
brightness_value_template: "{{ value_json.brightness }}"
rgb_value_template: "{{ value_json.rgb | join(',') }}"
qos: 0
payload_on: "ON"
payload_off: "OFF"
optimistic: false
```
{% endraw %}
### {% linkable_title Brightness and no RGB support %}
@ -260,7 +262,6 @@ light:
on_command_type: 'brightness'
```
### {% linkable_title Implementations %}
- A [basic example](https://github.com/mertenats/open-home-automation/tree/master/ha_mqtt_light) using a nodeMCU board (ESP8266) to control its built-in LED (on/off).