Skip to content

Commit

Permalink
Auto-Merge: Pull request project-chip#1782: [AUTO] Provision: Manufac…
Browse files Browse the repository at this point in the history
…turing 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 <[email protected]>
Date:   Wed Apr 24 08:50:26 2024 -0400

    Provision: Manufacturing date default.
  • Loading branch information
rcasallas-silabs committed Apr 26, 2024
1 parent e66e0bf commit 04c0100
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 1 addition & 2 deletions provision/inputs/silabs.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 6 additions & 0 deletions provision/modules/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 04c0100

Please sign in to comment.