Skip to content

Commit 43e3b56

Browse files
soldagballoob
authored andcommitted
Add docs for pwm led platform. (home-assistant#2402)
* Add docs for pwm led platform. * Renamed pwm platform to rpi_gpio_pwm.
1 parent 801ed69 commit 43e3b56

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
layout: page
3+
title: "PWM LED"
4+
description: "Instructions on how to setup pwm leds within Home Assistant."
5+
date: 2017-04-04 13:00
6+
sidebar: true
7+
layout: page
8+
comments: false
9+
sharing: true
10+
footer: true
11+
ha_category: Light
12+
ha_iot_class: "Local Push"
13+
ha_release: 0.43
14+
---
15+
16+
The `rpi_gpio_pwm` platform allows to control multiple lights using pulse-width modulation, for example led strips. It supports one-color, RGB and RGBW leds driven by GPIOs of an Raspberry Pi or a PCA9685 controller.
17+
18+
### {% linkable_title Configuration %}
19+
20+
```yaml
21+
# Example configuration.yaml entry
22+
light:
23+
platform: rpi_gpio_pwm
24+
leds:
25+
# One-color led directly connected to GPIO
26+
- name: Lightstrip Cupboard
27+
driver: gpio
28+
pins: [17]
29+
type: simple
30+
# RGB led connected to PCA9685 controller
31+
- name: TV Backlight
32+
driver: pca9685
33+
pins: [0, 1, 2] # [R, G, B]
34+
type: rgb
35+
# RGBW led connected to PCA9685 controller
36+
- name: Lightstrip Desk
37+
driver: pca9685
38+
pins: [3, 4, 5, 6] # [R, G, B, W]
39+
type: rgbw
40+
```
41+
42+
Configuration variables:
43+
44+
- **leds** array (*Required*):
45+
- **name** (*Required*): The name of the led.
46+
- **driver** (*Required*): The driver, which controls the led. Choose either `gpio` or `pca9685`.
47+
- **pins** (*Required*): The pins connected to the led. The order of pins is determined by the specified type.
48+
- **type** (*Required*): The type of led. Choose either `rgb`, `rgbw` or `simple`.
49+
- **freq** (*Optional*): The PWM frequency. (Default: `200`)
50+
- **address** (*Optional*): The address of the PCA9685 driver. (Default: `0x40`)

0 commit comments

Comments
 (0)