mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Remove obsolete light attributes from WLED (#60535)
This commit is contained in:
parent
dd001cacfd
commit
4cff04cbd5
@ -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."""
|
||||
|
@ -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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user