File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414from mashumaro .types import SerializableType , SerializationStrategy
1515
1616from .const import (
17+ DEFAULT_REPO ,
1718 MIN_REQUIRED_VERSION ,
1819 LightCapability ,
1920 LiveDataOverride ,
@@ -489,6 +490,11 @@ class Info(BaseModel): # pylint: disable=too-many-instance-attributes
489490 product : str = "DIY Light"
490491 """The product name. Always FOSS for standard installations."""
491492
493+ repo : str = field (default = DEFAULT_REPO , metadata = field_options (alias = "repo" ))
494+ """GitHub repository in 'org/repo' format reported by the device firmware.
495+ Used in preference to the default repo when fetching releases or upgrading.
496+ """
497+
492498 release : str | None = None
493499 """The release name of the firmware build.
494500
Original file line number Diff line number Diff line change @@ -654,6 +654,10 @@ async def upgrade( # noqa: PLR0912
654654 msg = "Device already running the requested version"
655655 raise WLEDUpgradeError (msg )
656656
657+ # Prefer the repo reported by the device itself; older firmware that does
658+ # not include the field will have fallen back to DEFAULT_REPO already.
659+ repo = self ._device .info .repo
660+
657661 # Determine if this is an Ethernet board
658662 ethernet = ""
659663 if (
You can’t perform that action at this time.
0 commit comments