From 0d38ee7378b6c8f3e3e34326e1eec3bbd8460db6 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 23 Jul 2021 14:03:46 +0200 Subject: [PATCH] Upgrade wled to 0.8.0 (#53376) --- homeassistant/components/wled/light.py | 5 ++++- homeassistant/components/wled/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/wled/light.py b/homeassistant/components/wled/light.py index 4326f1066c7..f4251a90343 100644 --- a/homeassistant/components/wled/light.py +++ b/homeassistant/components/wled/light.py @@ -5,6 +5,7 @@ from functools import partial from typing import Any, Tuple, cast import voluptuous as vol +from wled import Playlist from homeassistant.components.light import ( ATTR_BRIGHTNESS, @@ -212,7 +213,9 @@ class WLEDSegmentLight(WLEDEntity, LightEntity): @property def extra_state_attributes(self) -> dict[str, Any] | None: """Return the state attributes of the entity.""" - playlist: int | None = self.coordinator.data.state.playlist + playlist: int | Playlist | None = self.coordinator.data.state.playlist + if isinstance(playlist, Playlist): + playlist = playlist.playlist_id if playlist == -1: playlist = None diff --git a/homeassistant/components/wled/manifest.json b/homeassistant/components/wled/manifest.json index dbe13fe56ca..5ece2d4b9d8 100644 --- a/homeassistant/components/wled/manifest.json +++ b/homeassistant/components/wled/manifest.json @@ -3,7 +3,7 @@ "name": "WLED", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/wled", - "requirements": ["wled==0.7.3"], + "requirements": ["wled==0.8.0"], "zeroconf": ["_wled._tcp.local."], "codeowners": ["@frenck"], "quality_scale": "platinum", diff --git a/requirements_all.txt b/requirements_all.txt index dff6eed22e9..1c6d1356f5b 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2381,7 +2381,7 @@ wirelesstagpy==0.5.0 withings-api==2.3.2 # homeassistant.components.wled -wled==0.7.3 +wled==0.8.0 # homeassistant.components.wolflink wolf_smartset==0.1.11 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index ddd5245c82b..e0919445fdc 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1305,7 +1305,7 @@ wiffi==1.0.1 withings-api==2.3.2 # homeassistant.components.wled -wled==0.7.3 +wled==0.8.0 # homeassistant.components.wolflink wolf_smartset==0.1.11