Skip to content

Commit

Permalink
Merge pull request #184 from Grizzelbee/Development
Browse files Browse the repository at this point in the history
V2.4.1 (2022-03-20) (Echo from the past)
  • Loading branch information
Grizzelbee authored Mar 21, 2022
2 parents ba5319c + 38a73b0 commit ad67b12
Show file tree
Hide file tree
Showing 6 changed files with 6,665 additions and 91 deletions.
110 changes: 55 additions & 55 deletions dysonConstants.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion io-package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
{
"common": {
"name": "dysonairpurifier",
"version": "2.4.0",
"version": "2.4.1",
"news": {
"2.4.1": {
"en": "Changed SystemStates from type string to boolean",
"de": "SystemStates vom Typ „String“ in „Boolean“ geändert",
"ru": "Тип SystemStates изменен со строкового на логический.",
"pt": "Alterado SystemStates do tipo string para booleano",
"nl": "Systeemstatus gewijzigd van type string in boolean",
"fr": "Changement de SystemStates de type chaîne en booléen",
"it": "SystemStates modificato da tipo stringa a booleano",
"es": "Cambiado SystemStates de tipo cadena a booleano",
"pl": "Zmieniono stany systemowe z typu string na logiczne",
"zh-cn": "将 SystemStates 从字符串类型更改为布尔值"
},
"2.4.0": {
"en": "Added warning code to device tree\nAdded Device-faults as SystemState to device tree\nAdded donate button to readme and config page\nSwitched \"Sending data to device\" message from loglevel info to debug\nreduced amount of debug messages\nUpdated dependencies,",
"de": "Warncode zum Gerätebaum hinzugefügt\nGerätefehler als SystemState zum Gerätebaum hinzugefügt\nSpenden-Schaltfläche zur Readme- und Konfigurationsseite hinzugefügt\nMeldung \"Daten an Gerät senden\" von Loglevel-Info auf Debug umgestellt\nAnzahl der Debug-Meldungen reduziert\nAbhängigkeiten aktualisiert,",
Expand Down
13 changes: 9 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,22 +311,22 @@ class dysonAirPurifier extends utils.Adapter {
}, null);
await this.createOrExtendObject(device.Serial + '.SystemState.product-errors', {
type: 'channel',
common: {name: 'Information on devices product errors', 'read': true, 'write': false, type:'string', role:'value'},
common: {name: 'Information on devices product errors - false=No error, true=Failure', 'read': true, 'write': false, type:'string', role:'value'},
native: {}
}, null);
await this.createOrExtendObject(device.Serial + '.SystemState.product-warnings', {
type: 'channel',
common: {name: 'Information on devices product-warnings', 'read': true, 'write': false, type:'string', role:'value'},
common: {name: 'Information on devices product-warnings - false=No error, true=Failure', 'read': true, 'write': false, type:'string', role:'value'},
native: {}
}, null);
await this.createOrExtendObject(device.Serial + '.SystemState.module-errors', {
type: 'channel',
common: {name: 'Information on devices module-errors', 'read': true, 'write': false, type:'string', role:'value'},
common: {name: 'Information on devices module-errors - false=No error, true=Failure', 'read': true, 'write': false, type:'string', role:'value'},
native: {}
}, null);
await this.createOrExtendObject(device.Serial + '.SystemState.module-warnings', {
type: 'channel',
common: {name: 'Information on devices module-warnings', 'read': true, 'write': false, type:'string', role:'value'},
common: {name: 'Information on devices module-warnings - false=No error, true=Failure', 'read': true, 'write': false, type:'string', role:'value'},
native: {}
}, null);
await this.createOrExtendObject(device.Serial + '.Firmware.Version', {
Expand Down Expand Up @@ -510,6 +510,11 @@ class dysonAirPurifier extends utils.Adapter {
const testValue = ( typeof message[deviceConfig[0]] === 'object'? message[deviceConfig[0]][1] : message[deviceConfig[0]] );
//this.log.debug(`${deviceConfig[1]} is a bool switch. Current state: [${testValue}]`);
value = (testValue === 'ON' || testValue === 'HUMD');
} else if (deviceConfig[3]==='boolean' && deviceConfig[5].startsWith('indicator')) {
// testValue should be the 2nd value in an array or if it's no array, the value itself
const testValue = ( typeof message[deviceConfig[0]] === 'object'? message[deviceConfig[0]][1] : message[deviceConfig[0]] );
//this.log.debug(`${deviceConfig[1]} is a bool switch. Current state: [${testValue}]`);
value = (testValue === 'FAIL');
} else {
// It's no bool switch
value = message[deviceConfig[0]];
Expand Down
Loading

0 comments on commit ad67b12

Please sign in to comment.