|
1 | | -import { execSync } from "node:child_process"; |
| 1 | +import {execSync} from "node:child_process"; |
2 | 2 |
|
3 | 3 | export async function newDeviceSupport(github, _core, context, zhcDir) { |
4 | 4 | const issue = context.payload.issue; |
@@ -29,7 +29,7 @@ export async function newDeviceSupport(github, _core, context, zhcDir) { |
29 | 29 | for (const [fullName, partialName] of tuyaManufacturerNames) { |
30 | 30 | const fullMatch = (() => { |
31 | 31 | try { |
32 | | - return execSync(`grep -r --include="*.ts" "${fullName}" "${zhcDir}"`, { encoding: "utf8" }); |
| 32 | + return execSync(`grep -r --include="*.ts" "${fullName}" "${zhcDir}"`, {encoding: "utf8"}); |
33 | 33 | } catch { |
34 | 34 | return undefined; |
35 | 35 | } |
@@ -60,7 +60,7 @@ If you need help with the process, feel free to ask here and we'll be happy to a |
60 | 60 |
|
61 | 61 | const partialMatch = (() => { |
62 | 62 | try { |
63 | | - return execSync(`grep -r --include="*.ts" "${partialName}" "${zhcDir}"`, { encoding: "utf8" }); |
| 63 | + return execSync(`grep -r --include="*.ts" "${partialName}" "${zhcDir}"`, {encoding: "utf8"}); |
64 | 64 | } catch { |
65 | 65 | return undefined; |
66 | 66 | } |
@@ -95,7 +95,7 @@ Let us know if it works so we can support this device out-of-the-box!`, |
95 | 95 | for (const zigbeeModel of zigbeeModels) { |
96 | 96 | const fullMatch = (() => { |
97 | 97 | try { |
98 | | - return execSync(`grep -r --include="*.ts" '"${zigbeeModel}"' "${zhcDir}"`, { encoding: "utf8" }); |
| 98 | + return execSync(`grep -r --include="*.ts" '"${zigbeeModel}"' "${zhcDir}"`, {encoding: "utf8"}); |
99 | 99 | } catch { |
100 | 100 | return undefined; |
101 | 101 | } |
@@ -138,10 +138,11 @@ In case all features work, please submit a pull request on this repository so th |
138 | 138 | For instructions on how to create a pull request see the [docs](https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html#_4-create-a-pull-request). |
139 | 139 |
|
140 | 140 | If **NOT** all features work, please follow the [How To Support new devices](https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html). |
141 | | -${tuyaManufacturerNames.length > 0 |
142 | | - ? "Since this is a Tuya also consider [How To Support new Tuya devices](https://www.zigbee2mqtt.io/advanced/support-new-devices/02_support_new_tuya_devices.html)." |
143 | | - : "" |
144 | | - } |
| 141 | +${ |
| 142 | + tuyaManufacturerNames.length > 0 |
| 143 | + ? "Since this is a Tuya also consider [How To Support new Tuya devices](https://www.zigbee2mqtt.io/advanced/support-new-devices/02_support_new_tuya_devices.html)." |
| 144 | + : "" |
| 145 | +} |
145 | 146 |
|
146 | 147 | If you need help with the process, feel free to ask here and we'll be happy to assist.`, |
147 | 148 | }); |
|
0 commit comments