mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-12-26 17:27:47 +01:00
Make explicit examples for splitting and joining using partitions (#1008)
This commit is contained in:
parent
164b75fd04
commit
58dad5feb4
@ -10,9 +10,10 @@ The ``partition`` light platform allows you to combine multiple addressable ligh
|
||||
This platform also allows splitting up an addressable lights into multiple segments, so that
|
||||
segments can be individually controlled.
|
||||
|
||||
Similarly, a single light strip can be partitioned into multiple partitions with this integration.
|
||||
Splitting a single LED strip
|
||||
----------------------------
|
||||
|
||||
If you want to do this, you may run into strange behavior like that the original light entity (e.g., ``fastled_clockless``)
|
||||
If you want to split a strip, you may run into strange behavior like that the original light entity (e.g., ``fastled_clockless``)
|
||||
may be conflicting with the partition. For better control over which segments of the strip will overlap each other,
|
||||
mark the original ``light`` as ``internal: true``.
|
||||
|
||||
@ -21,16 +22,54 @@ mark the original ``light`` as ``internal: true``.
|
||||
# Example configuration entry
|
||||
light:
|
||||
- platform: partition
|
||||
name: "Partition Light"
|
||||
name: "Partition Light 1"
|
||||
segments:
|
||||
# Use first LED from the light with ID light1
|
||||
# Use first 10 LEDs from the light with ID light1
|
||||
- id: light1
|
||||
from: 0
|
||||
to: 0
|
||||
# Use 10 leds from light with ID light2 starting 2nd LED
|
||||
to: 9
|
||||
|
||||
- platform: partition
|
||||
name: "Partition Light 2"
|
||||
segments:
|
||||
# Use LEDs 11-20 from the light with ID light1
|
||||
- id: light1
|
||||
from: 10
|
||||
to: 19
|
||||
|
||||
# Example for light segment source
|
||||
- platform: fastled_clockless
|
||||
id: light1
|
||||
# You may want (but don't need) this
|
||||
internal: true
|
||||
# Other settings
|
||||
|
||||
Joining multiple LED strips into one
|
||||
------------------------------------
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
light:
|
||||
- platform: partition
|
||||
name: "Partition Light"
|
||||
segments:
|
||||
# Use first 10 LEDs from the light with ID light1
|
||||
- id: light1
|
||||
from: 0
|
||||
to: 9
|
||||
# Use first 10 LEDs from light with ID light2
|
||||
# they become LEDs 11-20 in the joined partition
|
||||
- id: light2
|
||||
from: 1
|
||||
to: 10
|
||||
from: 0
|
||||
to: 9
|
||||
|
||||
# Example for light segment source
|
||||
- platform: fastled_clockless
|
||||
id: light1
|
||||
# You may want (but don't need) this
|
||||
internal: true
|
||||
# Other settings
|
||||
|
||||
# Example for light segment source
|
||||
- platform: fastled_clockless
|
||||
|
Loading…
Reference in New Issue
Block a user