Skip to content

Commit b4e5db5

Browse files
committed
clarify on, off, and stop light color options in light_player config reference
1 parent 1a0a2a8 commit b4e5db5

File tree

1 file changed

+39
-9
lines changed

1 file changed

+39
-9
lines changed

docs/config/light_player.md

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,23 @@ light_player:
3333
``` yaml
3434
shows:
3535
rainbow:
36-
- lights:
36+
- duration: 1s
37+
lights:
3738
(leds): red
38-
- lights:
39+
- duration: 1s
40+
lights:
3941
(leds): orange
40-
- lights:
42+
- duration: 1s
43+
lights:
4144
(leds): yellow
42-
- lights:
45+
- duration: 1s
46+
lights:
4347
(leds): green
44-
- lights:
48+
- duration: 1s
49+
lights:
4550
(leds): blue
46-
- lights:
51+
- duration: 1s
52+
lights:
4753
(leds): purple
4854
```
4955
@@ -69,9 +75,33 @@ If you use brightness on an RGB light MPF will
6975
use the brightness for every channel. For instance brigness `AA` will
7076
result in color `AAAAAA`.
7177

72-
There is a special color `stop` which will remove the current light
73-
entry from the light stack and the current show will become transparent
74-
to underlying shows as if the light has never been used in this show.
78+
#### Special color directives: `on`, `off`, and `stop`
79+
80+
MPF supports a few special terms that may be used instead of a color value.
81+
82+
##### `on`
83+
84+
If your light has a [default_on_color](lights.md#default_on_color) set, then instead of having
85+
to name that color in particular, you can just use `on`. If you do not have one set, the light will
86+
instead turn white (or its native color if single-channel.)
87+
88+
##### `off`
89+
90+
When you turn a light on to a certain color in a show, it will remain on throughout the show unless
91+
directed otherwise. If you want your light to turn on for only a specific time, you will need to
92+
explicitly set it to `off`. Another use case for `off` is when a lower-priority show has a light turned on,
93+
but another show at a higher prority wants to override this -- you can set a light to `off` in a show without
94+
having turned it on in that show first, just to ensure it is truly off.
95+
96+
##### `stop`
97+
98+
The `off`directive tells the light controller to specifically hold a light to no power, but does *not*
99+
release the light from control. If you instead have a show that *no longer needs control* over a light
100+
that it has already set at least once, you can use `stop` to remove the show's priority level hold on
101+
the light's color. Imagine having something like a lightning strike show, where lights from all over
102+
your machine flash yellow, but then immediately return to their previous color setting -- you would use
103+
`stop` the step after each light flash to allow the previously-set color to show through again.
104+
75105

76106
### fade:
77107

0 commit comments

Comments
 (0)