Skip to content

Commit 31d1cb4

Browse files
Extended smartName (#2675)
* Extended smartName * Extended smartName * Fixed tests * document depreaction --------- Co-authored-by: foxriver76 <[email protected]>
1 parent b4514c4 commit 31d1cb4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

packages/types-dev/objects.d.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,17 +264,18 @@ declare global {
264264

265265
/**
266266
* Settings for IOT adapters and how the state should be named in e.g., Alexa.
267-
* The string "ignore" is a special case, causing the state to be ignored.
268-
* A value of `null` means, that the device should be removed by the IOT adapters
267+
* The string "ignore" (deprecated please use boolean `false` instead) or boolean value `false` is a special case, causing the state to be ignored.
268+
* A value of `null` means that the device should be removed by the IOT adapters
269269
*/
270270
smartName?:
271271
| null
272+
| false
272273
| string
273274
| ({ [lang in Languages]?: string } & {
274275
/** Which kind of device it is */
275276
smartType?: string | null;
276277
/** Which value to set when the ON command is issued */
277-
byOn?: string | null;
278+
byON?: string | null;
278279
});
279280
}
280281

packages/types-public/index.test-d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ adapter.getObjectAsync('id').then(obj => {
680680
declare let state: ioBroker.StateObject;
681681
if (typeof state.common.smartName === 'object' && state.common.smartName !== null) {
682682
state.common.smartName.de && state.common.smartName.de.toUpperCase();
683-
state.common.smartName.byOn && state.common.smartName.byOn.toUpperCase();
683+
state.common.smartName.byON && state.common.smartName.byON.toUpperCase();
684684
}
685685

686686
declare let enumObj: ioBroker.EnumObject;

0 commit comments

Comments
 (0)