Skip to content

Commit

Permalink
Fix RGBW light TypeError: 'tuple' object does not support item assign…
Browse files Browse the repository at this point in the history
…ment
  • Loading branch information
Breina committed Nov 26, 2023
1 parent b529e13 commit 9437b30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
4 changes: 2 additions & 2 deletions custom_components/artnet_led/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ def _update_values(self, values: array[int]):
self._state, self._attr_brightness, red, green, blue, white, _, _ = \
from_values(self._channel_setup, self.channel_size[1], values)

self._vals = (red, green, blue, white)
self._vals = [red, green, blue, white]

self._channel_value_change()

Expand All @@ -793,7 +793,7 @@ async def async_turn_on(self, **kwargs):

# RGB already contains brightness information
if ATTR_RGBW_COLOR in kwargs:
self._vals = kwargs[ATTR_RGBW_COLOR]
self._vals = list(kwargs[ATTR_RGBW_COLOR])

if ATTR_HS_COLOR in kwargs:
hue, sat = kwargs[ATTR_HS_COLOR]
Expand Down
12 changes: 2 additions & 10 deletions staging/configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,8 @@ light:
- 0
- 0
- channel: 6
name: rgbww_light
type: rgbww
min_temp: 2000K
max_temp: 6500K
channel_setup:
- d
- t
- 0
- u
- U
name: rgbw_light
type: rgbw

logger:
default: info
Expand Down

0 comments on commit 9437b30

Please sign in to comment.