From 4cff04cbd5a2a71e58de5a91253ed56c96788611 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Mon, 29 Nov 2021 11:32:30 +0100 Subject: [PATCH] Remove obsolete light attributes from WLED (#60535) --- homeassistant/components/wled/light.py | 11 ----------- tests/components/wled/test_light.py | 10 ---------- 2 files changed, 21 deletions(-) diff --git a/homeassistant/components/wled/light.py b/homeassistant/components/wled/light.py index 2081208e398..d2c92989100 100644 --- a/homeassistant/components/wled/light.py +++ b/homeassistant/components/wled/light.py @@ -216,17 +216,6 @@ class WLEDSegmentLight(WLEDEntity, LightEntity): return super().available - @property - def extra_state_attributes(self) -> dict[str, Any] | None: - """Return the state attributes of the entity.""" - segment = self.coordinator.data.state.segments[self._segment] - return { - ATTR_INTENSITY: segment.intensity, - ATTR_PALETTE: segment.palette.name, - ATTR_REVERSE: segment.reverse, - ATTR_SPEED: segment.speed, - } - @property def rgb_color(self) -> tuple[int, int, int] | None: """Return the color value.""" diff --git a/tests/components/wled/test_light.py b/tests/components/wled/test_light.py index 7826fe5521b..6036176d233 100644 --- a/tests/components/wled/test_light.py +++ b/tests/components/wled/test_light.py @@ -55,11 +55,6 @@ async def test_rgb_light_state( assert state.attributes.get(ATTR_EFFECT) == "Solid" assert state.attributes.get(ATTR_HS_COLOR) == (37.412, 100.0) assert state.attributes.get(ATTR_ICON) == "mdi:led-strip-variant" - assert state.attributes.get(ATTR_INTENSITY) == 128 - assert state.attributes.get(ATTR_PALETTE) == "Default" - assert state.attributes.get(ATTR_PRESET) is None - assert state.attributes.get(ATTR_REVERSE) is False - assert state.attributes.get(ATTR_SPEED) == 32 assert state.state == STATE_ON entry = entity_registry.async_get("light.wled_rgb_light") @@ -73,11 +68,6 @@ async def test_rgb_light_state( assert state.attributes.get(ATTR_EFFECT) == "Blink" assert state.attributes.get(ATTR_HS_COLOR) == (148.941, 100.0) assert state.attributes.get(ATTR_ICON) == "mdi:led-strip-variant" - assert state.attributes.get(ATTR_INTENSITY) == 64 - assert state.attributes.get(ATTR_PALETTE) == "Random Cycle" - assert state.attributes.get(ATTR_PRESET) is None - assert state.attributes.get(ATTR_REVERSE) is True - assert state.attributes.get(ATTR_SPEED) == 16 assert state.state == STATE_ON entry = entity_registry.async_get("light.wled_rgb_light_segment_1")