diff --git a/.github/workflows/ghcr_cleanup.yml b/.github/workflows/ghcr_cleanup.yml index 1e7075b38..ccb296e19 100644 --- a/.github/workflows/ghcr_cleanup.yml +++ b/.github/workflows/ghcr_cleanup.yml @@ -3,6 +3,7 @@ on: name: GHCR cleanup +permissions: {} jobs: build: runs-on: ubuntu-latest diff --git a/.github/workflows/update_frontend.yml b/.github/workflows/update_frontend.yml index 1382d3864..451318362 100644 --- a/.github/workflows/update_frontend.yml +++ b/.github/workflows/update_frontend.yml @@ -3,8 +3,13 @@ on: repository_dispatch: types: update_frontend +permissions: {} jobs: update_frontend: + permissions: + contents: write # to create branch (peter-evans/create-pull-request) + pull-requests: write # to create a PR (peter-evans/create-pull-request) + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/update_zh.yml b/.github/workflows/update_zh.yml index 92aaa05ec..bba3ec2ae 100644 --- a/.github/workflows/update_zh.yml +++ b/.github/workflows/update_zh.yml @@ -3,8 +3,13 @@ on: repository_dispatch: types: update_zh +permissions: {} jobs: update_zh: + permissions: + contents: write # to create branch (peter-evans/create-pull-request) + pull-requests: write # to create a PR (peter-evans/create-pull-request) + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/update_zhc.yml b/.github/workflows/update_zhc.yml index 7df5e88c5..a75cb1f79 100644 --- a/.github/workflows/update_zhc.yml +++ b/.github/workflows/update_zhc.yml @@ -3,8 +3,13 @@ on: repository_dispatch: types: update_zhc +permissions: {} jobs: update_zhc: + permissions: + contents: write # to create branch (peter-evans/create-pull-request) + pull-requests: write # to create a PR (peter-evans/create-pull-request) + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/lib/extension/bind.ts b/lib/extension/bind.ts index d2da7e822..fa7a5ac8c 100755 --- a/lib/extension/bind.ts +++ b/lib/extension/bind.ts @@ -68,7 +68,8 @@ const reportClusters: {[s: string]: type PollOnMessage = { cluster: {[s: string]: {type: string, data: KeyValue}[]} read: {cluster: string, attributes: string[], attributesForEndpoint?: (endpoint: zh.Endpoint) => Promise} - manufacturerIDs: number[] + manufacturerIDs: number[], + manufacturerNames: string [], }[]; const pollOnMessage: PollOnMessage = [ @@ -102,6 +103,10 @@ const pollOnMessage: PollOnMessage = [ zigbeeHersdman.Zcl.ManufacturerCode.MUELLER_LICHT_INT, zigbeeHersdman.Zcl.ManufacturerCode.TELINK, ], + manufacturerNames: [ + 'GLEDOPTO', + 'Trust International B.V.\u0000', + ], }, { cluster: { @@ -133,6 +138,10 @@ const pollOnMessage: PollOnMessage = [ zigbeeHersdman.Zcl.ManufacturerCode.MUELLER_LICHT_INT, zigbeeHersdman.Zcl.ManufacturerCode.TELINK, ], + manufacturerNames: [ + 'GLEDOPTO', + 'Trust International B.V.\u0000', + ], }, { cluster: { @@ -160,6 +169,10 @@ const pollOnMessage: PollOnMessage = [ zigbeeHersdman.Zcl.ManufacturerCode.MUELLER_LICHT_INT, zigbeeHersdman.Zcl.ManufacturerCode.TELINK, ], + manufacturerNames: [ + 'GLEDOPTO', + 'Trust International B.V.\u0000', + ], }, ]; @@ -456,7 +469,8 @@ export default class Bind extends Extension { for (const endpoint of toPoll) { for (const poll of polls) { - if (!poll.manufacturerIDs.includes(endpoint.getDevice().manufacturerID) || + if ((!poll.manufacturerIDs.includes(endpoint.getDevice().manufacturerID) && + !poll.manufacturerNames.includes(endpoint.getDevice().manufacturerName)) || !endpoint.supportsInputCluster(poll.read.cluster)) { continue; }