Skip to content

Commit

Permalink
add brightness to the tile effect palette
Browse files Browse the repository at this point in the history
  • Loading branch information
exking committed Jan 5, 2020
1 parent c60cc12 commit 2592684
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions lifx-poly.py
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ def set_effect(self, command):
try:
self.device.set_multizone_effect(effect_type=effect_type, speed=effect_speed, duration=effect_duration, parameters=parameters)
except (lifxlan.WorkflowException, TypeError) as ex:
LOGGER.error('set_tile_effect error {}'.format(ex))
LOGGER.error('set_effect error {}'.format(ex))


commands = {
Expand Down Expand Up @@ -1055,8 +1055,9 @@ def set_tile_effect(self, command):
if effect_type > 0:
effect_type += 1
if effect_type == 2:
palette = [(0, 65535, 65535, 3500), (7281, 65535, 65535, 3500), (10922, 65535, 65535, 3500), (22209, 65535, 65535, 3500),
(43507, 65535, 65535, 3500), (49333, 65535, 65535, 3500), (53520, 65535, 65535, 3500)]
brightness = int(query.get('B.uom56'))
palette = [(0, 65535, brightness, 3500), (7281, 65535, brightness, 3500), (10922, 65535, brightness, 3500), (22209, 65535, brightness, 3500),
(43507, 65535, brightness, 3500), (49333, 65535, brightness, 3500), (53520, 65535, brightness, 3500)]
else:
palette = []
effect_speed = int(query.get('ES.uom42'))
Expand Down
2 changes: 1 addition & 1 deletion profile/nls/en_us.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ PGM-CMD-SET_HSBKD-FMT = /H// Hue ${v}/ /S// Saturation ${v}/ /B// Brightness ${v
PGM-CMD-SET_HSBKDZ-FMT = /Z// Zone ${v}/ /H// Hue ${v}/ /S// Saturation ${v}/ /B// Brightness ${v}/ /K// Color Temp ${v}/ /D// in ${v}/
PGM-CMD-WAVEFORM-FMT = /WF// ${v}/ /CY// ${v} cycles/ /PE// ${v} each,/ /DC// duty cycle ${v}/ /H// Hue ${v}/ /S// Saturation ${v}/ /B// Brightness ${v}/ /K// Color Temp ${v}/
PGM-CMD-lifxmz-EFFECT-FMT = /EF// Effect ${v}/ /ES// Speed ${v}/ /ED// Duration ${v}/ /ER// Reverse Direction ${v}/
PGM-CMD-lifxt-EFFECT-FMT = /EF// Effect ${v}/ /ES// Speed ${v}/ /ED// Duration ${v}/
PGM-CMD-lifxt-EFFECT-FMT = /EF// Effect ${v}/ /ES// Speed ${v}/ /ED// Duration ${v}/ /B// Brightness ${v}/
1 change: 1 addition & 0 deletions profile/nodedef/nodedefs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@
<p id="EF" editor="lifxtef" init="0" />
<p id="ES" editor="lifxes" init="3000" />
<p id="ED" editor="lifxes" init="0" />
<p id="B" editor="lifxclr" init="GV3" />
</cmd>
</accepts>
</cmds>
Expand Down
2 changes: 1 addition & 1 deletion server.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{
"title": "polylifx: A Python library for LIFX",
"author": "James Milne (Einstein.42)",
"version": "2.1.20",
"version": "2.1.21",
"date": "November 8, 2017",
"source": "https://github.com/Einstein42/lifx-nodeserver",
"license": "https://github.com/Einstein42/lifx-nodeserver/blob/master/LICENSE"
Expand Down

0 comments on commit 2592684

Please sign in to comment.