From 3610d7d58122b90e4b6129dedbb8fd046c1c11d8 Mon Sep 17 00:00:00 2001 From: Ricardo Casallas Date: Fri, 26 Apr 2024 16:05:31 +0000 Subject: [PATCH] Auto-Merge: Pull request #1782: [AUTO] Provision: Manufacturing date default. Merge in WMN_TOOLS/matter from feature/provision-manufacturing_date to RC_2.3.0-1.3 Squashed commit of the following: commit 4399077160e8de8e8e4369b3dbf3d9a46e7b93c9 Author: Ricardo Casallas <77841255+rcasallas-silabs@users.noreply.github.com> Date: Wed Apr 24 08:50:26 2024 -0400 Provision: Manufacturing date default. --- provision/inputs/silabs.json | 3 +-- provision/modules/manager.py | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/provision/inputs/silabs.json b/provision/inputs/silabs.json index 7b41a3f99012b7..ebf0f149fe7ed4 100644 --- a/provision/inputs/silabs.json +++ b/provision/inputs/silabs.json @@ -3,8 +3,7 @@ "matter": { "instance_info": { "vendor_id": 4169, - "product_id": 32773, - "manufacturing_date": "0000-00-00" + "product_id": 32773 }, "commissionable_data": { "discriminator": 3841, diff --git a/provision/modules/manager.py b/provision/modules/manager.py index e402e248785ae6..f0e9b72e50ccc7 100644 --- a/provision/modules/manager.py +++ b/provision/modules/manager.py @@ -2,6 +2,7 @@ import random import base64 import importlib +import datetime import modules.util as _util import modules.tools as _tools import modules.device as _dev @@ -114,6 +115,11 @@ def computeDefaults(self, paths, args): if(args.int(ID.kProductId) is None): raise ValueError("Missing product ID") + # Manufacturing Date + mdate = args.get(ID.kManufacturingDate) + if mdate.value is None: + mdate.set("{:%Y-%m-%d}".format(datetime.date.today())) + # Credentials creds = _creds.Credentials(paths, args) creds.collect()