Compare commits

...

3 Commits

Author SHA1 Message Date
Franck Nijhof
16b8130676 Fix mypy errors for wled 0.22.0 Segment type changes
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 20:23:52 +00:00
Franck Nijhof
f6cfd69f6b Update tests/components/wled/test_update.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-16 22:10:48 +02:00
Franck Nijhof
87bcb34035 Update wled to v0.22.0 2026-04-16 20:02:48 +00:00
8 changed files with 57 additions and 8 deletions

View File

@@ -188,12 +188,11 @@ class WLEDSegmentLight(WLEDEntity, LightEntity):
# If this is the one and only segment, calculate brightness based
# on the main and segment brightness
segment_brightness = int(state.segments[self._segment].brightness)
if not self.coordinator.has_main_light:
return int(
(state.segments[self._segment].brightness * state.brightness) / 255
)
return int((segment_brightness * state.brightness) / 255)
return state.segments[self._segment].brightness
return segment_brightness
@property
def effect_list(self) -> list[str]:

View File

@@ -7,6 +7,6 @@
"integration_type": "device",
"iot_class": "local_push",
"quality_scale": "platinum",
"requirements": ["wled==0.21.0"],
"requirements": ["wled==0.22.0"],
"zeroconf": ["_wled._tcp.local."]
}

View File

@@ -54,7 +54,7 @@ NUMBERS = [
native_step=1,
native_min_value=0,
native_max_value=255,
value_fn=lambda segment: segment.speed,
value_fn=lambda segment: int(segment.speed),
),
WLEDNumberEntityDescription(
key=ATTR_INTENSITY,

2
requirements_all.txt generated
View File

@@ -3312,7 +3312,7 @@ wiim==0.1.0
wirelesstagpy==0.8.1
# homeassistant.components.wled
wled==0.21.0
wled==0.22.0
# homeassistant.components.wolflink
wolf-comm==0.0.48

View File

@@ -2806,7 +2806,7 @@ wiffi==1.1.2
wiim==0.1.0
# homeassistant.components.wled
wled==0.21.0
wled==0.22.0
# homeassistant.components.wolflink
wolf-comm==0.0.48

View File

@@ -60,6 +60,8 @@ def mock_wled_releases() -> Generator[MagicMock]:
wled_releases = wled_releases_mock.return_value
wled_releases.releases.return_value = Releases(
beta="1.0.0b5",
nightly=None,
repo="wled/WLED",
stable="0.99.0",
)

View File

@@ -194,6 +194,7 @@
'arch': 'esp32',
'brand': 'WLED',
'core': 'v3.3.6-16-gcc5440f6a2',
'cpalcount': 0,
'freeheap': 198384,
'fs': dict({
'pmt': 1718827787.0,
@@ -203,16 +204,19 @@
'fxcount': 187,
'ip': '127.0.0.1',
'leds': dict({
'cct': False,
'count': 30,
'fps': 5,
'light_capabilities': 1,
'max_power': 850,
'max_segments': 32,
'power': 515,
'rgbw': False,
'segment_light_capabilities': list([
1,
1,
]),
'wv': False,
}),
'lip': '',
'live': False,
@@ -221,6 +225,7 @@
'name': 'WLED RGB Light',
'palcount': 71,
'product': 'FOSS',
'str': False,
'udpport': 21324,
'uptime': 966,
'ver': '0.14.4',
@@ -306,17 +311,23 @@
}),
'state': dict({
'bri': 128,
'ledmap': 0,
'lor': 0,
'mainseg': 1,
'nl': dict({
'dur': 60,
'mode': 1,
'on': False,
'rem': -1,
'tbri': 0,
}),
'on': True,
'seg': dict({
'0': dict({
'bri': 255,
'c1': 128,
'c2': 128,
'c3': 16,
'cct': 127,
'cln': -1,
'col': list([
@@ -336,20 +347,39 @@
0,
]),
]),
'frz': False,
'fx': 0,
'grp': 1,
'id': 0,
'ix': 128,
'len': 15,
'm12': 0,
'mY': False,
'mi': False,
'o1': False,
'o2': False,
'o3': False,
'of': 0,
'on': True,
'pal': 0,
'rY': False,
'rev': False,
'sel': False,
'set': 0,
'si': 0,
'spc': 0,
'start': 0,
'startY': 0,
'stop': 15,
'stopY': 0,
'sx': 32,
'tp': False,
}),
'1': dict({
'bri': 255,
'c1': 128,
'c2': 128,
'c3': 16,
'cct': 127,
'cln': -1,
'col': list([
@@ -369,17 +399,33 @@
0,
]),
]),
'frz': False,
'fx': 3,
'grp': 1,
'id': 1,
'ix': 64,
'len': 15,
'm12': 0,
'mY': False,
'mi': False,
'o1': False,
'o2': False,
'o3': False,
'of': 0,
'on': True,
'pal': 1,
'rY': False,
'rev': True,
'sel': True,
'set': 0,
'si': 0,
'spc': 0,
'start': 15,
'startY': 0,
'stop': 30,
'stopY': 0,
'sx': 16,
'tp': False,
}),
}),
'transition': 7,

View File

@@ -63,6 +63,8 @@ async def test_update_information_available(
"""Test having no update information available at all."""
mock_wled_releases.releases.return_value = Releases(
beta=None,
nightly=None,
repo="https://github.com/wled/WLED",
stable=None,
)