Skip to content
9 changes: 9 additions & 0 deletions src/wled/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,15 @@ class Info(BaseModel): # pylint: disable=too-many-instance-attributes
brand: str = "WLED"
"""The producer/vendor of the light. Always WLED for standard installations."""

release: str | None = None
"""The release name of the WLED device firmware.

Examples:
- ESP32_Ethernet
- ESP8266_160
- ESP8266_compat
"""

build: str = field(default="Unknown", metadata=field_options(alias="vid"))
"""Build ID (YYMMDDB, B = daily build index)."""

Expand Down
5 changes: 4 additions & 1 deletion src/wled/wled.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,9 @@
url = URL.build(scheme="http", host=self.host, port=80, path="/update")
architecture = self._device.info.architecture.upper()
update_file = f"WLED_{version}_{architecture}{ethernet}.bin{gzip}"
if self._device.info.release is not None:
update_file = f"{self._device.info.brand}_{version}_{self._device.info.release}.bin{gzip}"

Check failure on line 640 in src/wled/wled.py

View workflow job for this annotation

GitHub Actions / Ruff

Ruff (E501)

src/wled/wled.py:640:89: E501 Line too long (102 > 88)

Check failure on line 640 in src/wled/wled.py

View workflow job for this annotation

GitHub Actions / Ruff

Ruff (E501)

src/wled/wled.py:640:89: E501 Line too long (102 > 88)

download_url = (
"https://github.com/Aircoookie/WLED/releases/download"
f"/v{version}/{update_file}"
Expand All @@ -659,7 +662,7 @@
raise WLEDConnectionTimeoutError(msg) from exception
except aiohttp.ClientResponseError as exception:
if exception.status == 404:
msg = f"Requested WLED version '{version}' does not exists"
msg = f"Requested file {update_file} does not exists"
raise WLEDUpgradeError(msg) from exception
msg = (
f"Could not download requested WLED version '{version}'"
Expand Down
Loading