Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/wled/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from mashumaro.types import SerializableType, SerializationStrategy

from .const import (
DEFAULT_REPO,
MIN_REQUIRED_VERSION,
LightCapability,
LiveDataOverride,
Expand Down Expand Up @@ -489,6 +490,11 @@ class Info(BaseModel): # pylint: disable=too-many-instance-attributes
product: str = "DIY Light"
"""The product name. Always FOSS for standard installations."""

repo: str = field(default=DEFAULT_REPO, metadata=field_options(alias="repo"))
"""GitHub repository in 'org/repo' format reported by the device firmware.
Used in preference to the default repo when fetching releases or upgrading.
Comment thread
netmindz marked this conversation as resolved.
Outdated
"""

Comment thread
frenck marked this conversation as resolved.
release: str | None = None
"""The release name of the firmware build.

Expand Down
4 changes: 4 additions & 0 deletions src/wled/wled.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,10 @@ async def upgrade( # noqa: PLR0912
msg = "Device already running the requested version"
raise WLEDUpgradeError(msg)

# Prefer the repo reported by the device itself; older firmware that does
# not include the field will have fallen back to DEFAULT_REPO already.
repo = self._device.info.repo
Comment thread
netmindz marked this conversation as resolved.
Outdated

# Determine if this is an Ethernet board
ethernet = ""
if (
Expand Down
Loading