mirror of
https://github.com/home-assistant/core.git
synced 2026-12-05 21:29:58 -04:00
Bump wled to 1.0.0 (#184352)
This commit is contained in:
@@ -159,14 +159,10 @@ class WLEDSegmentLight(WLEDEntity, LightEntity):
|
||||
)
|
||||
|
||||
if (
|
||||
coordinator.data.info.leds.segment_light_capabilities is not None
|
||||
and (
|
||||
color_modes := LIGHT_CAPABILITIES_COLOR_MODE_MAPPING.get(
|
||||
coordinator.data.info.leds.segment_light_capabilities[segment]
|
||||
)
|
||||
)
|
||||
is not None
|
||||
):
|
||||
capabilities := coordinator.data.state.segments[segment].light_capabilities
|
||||
) is not None and (
|
||||
color_modes := LIGHT_CAPABILITIES_COLOR_MODE_MAPPING.get(capabilities)
|
||||
) is not None:
|
||||
self._attr_color_mode = color_modes[0]
|
||||
self._attr_supported_color_modes = set(color_modes)
|
||||
|
||||
|
||||
@@ -7,6 +7,6 @@
|
||||
"integration_type": "device",
|
||||
"iot_class": "local_push",
|
||||
"quality_scale": "platinum",
|
||||
"requirements": ["wled==0.23.0"],
|
||||
"requirements": ["wled==1.0.0"],
|
||||
"zeroconf": ["_wled._tcp.local."]
|
||||
}
|
||||
|
||||
Generated
+1
-1
@@ -3461,7 +3461,7 @@ wiim==0.1.7
|
||||
wirelesstagpy==0.8.1
|
||||
|
||||
# homeassistant.components.wled
|
||||
wled==0.23.0
|
||||
wled==1.0.0
|
||||
|
||||
# homeassistant.components.wolflink
|
||||
wolf-comm==0.0.52
|
||||
|
||||
@@ -200,6 +200,7 @@
|
||||
'count': 30,
|
||||
'fps': 5,
|
||||
'light_capabilities': 1,
|
||||
'matrix': None,
|
||||
'max_power': 850,
|
||||
'max_segments': 32,
|
||||
'power': 515,
|
||||
@@ -215,8 +216,10 @@
|
||||
'lm': '',
|
||||
'mac': 'aabbccddeeff',
|
||||
'name': 'WLED RGB Light',
|
||||
'opt': 79,
|
||||
'palcount': 71,
|
||||
'product': 'FOSS',
|
||||
'repo': 'wled/WLED',
|
||||
'str': False,
|
||||
'udpport': 21324,
|
||||
'umpalcount': 0,
|
||||
@@ -345,6 +348,7 @@
|
||||
'grp': 1,
|
||||
'id': 0,
|
||||
'ix': 128,
|
||||
'lc': 1,
|
||||
'len': 15,
|
||||
'm12': 0,
|
||||
'mY': False,
|
||||
@@ -397,6 +401,7 @@
|
||||
'grp': 1,
|
||||
'id': 1,
|
||||
'ix': 64,
|
||||
'lc': 1,
|
||||
'len': 15,
|
||||
'm12': 0,
|
||||
'mY': False,
|
||||
|
||||
@@ -71,6 +71,23 @@ async def test_snapshots(
|
||||
await snapshot_platform(hass, entity_registry, snapshot, mock_config_entry.entry_id)
|
||||
|
||||
|
||||
async def test_segment_with_sparse_ids(
|
||||
hass: HomeAssistant,
|
||||
mock_wled: MagicMock,
|
||||
mock_config_entry: MockConfigEntry,
|
||||
) -> None:
|
||||
"""Test segment lights still set up after a segment in the middle is deleted."""
|
||||
data = await async_load_json_object_fixture(hass, "rgb.json", DOMAIN)
|
||||
data["state"]["seg"][1]["id"] = 2
|
||||
mock_wled.update.return_value = WLEDDevice.from_dict(data)
|
||||
|
||||
await hass.config_entries.async_reload(mock_config_entry.entry_id)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert (state := hass.states.get("light.wled_rgb_light_segment_2"))
|
||||
assert state.attributes[ATTR_SUPPORTED_COLOR_MODES] == [ColorMode.RGB]
|
||||
|
||||
|
||||
async def test_segment_change_state(
|
||||
hass: HomeAssistant,
|
||||
mock_wled: MagicMock,
|
||||
|
||||
Reference in New Issue
Block a user