Allow non Gledopto manuf name for images with Gledopto manuf code

This commit is contained in:
Koen Kanters
2025-11-12 21:02:54 +01:00
parent 7c08796604
commit 0adbe018df
2 changed files with 7 additions and 1 deletions
+5 -1
View File
@@ -149,7 +149,11 @@ export async function processOtaFiles(
const statusToBase = getParsedImageStatus(parsedImage, baseMatch);
// Manufacturer specific checks
if (parsedImage.manufacturerCode === GLEDOPTO_MANUFACTURER_CODE && !fileExtraMetas.modelId) {
if (
parsedImage.manufacturerCode === GLEDOPTO_MANUFACTURER_CODE &&
!fileExtraMetas.modelId &&
(fileExtraMetas.manufacturerName == null || fileExtraMetas.manufacturerName.some((name) => name.toLowerCase().includes("gledopto")))
) {
// Gledopto uses the same imageType for every device, force modelId to be present.
// https://github.com/Koenkk/zigbee-OTA/pull/864
throw new Error("Gledopto image requires extra `modelId` metadata");