Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b54916d743 | ||
|
|
52d8bddb11 | ||
|
|
271bd03d14 | ||
|
|
36bc7c99fd | ||
|
|
cc76a49d62 | ||
|
|
7a2475ba02 | ||
|
|
47cb4cfad8 | ||
|
|
2a473f88b0 | ||
|
|
245032a178 | ||
|
|
96e6c5b471 | ||
|
|
82614cdad0 | ||
|
|
e6b58530d4 | ||
|
|
dc47f48004 |
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Check if PR should be auto-merged
|
||||
uses: ahmadnassri/action-dependabot-auto-merge@v2
|
||||
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
node-version: [12.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
@@ -56,11 +56,11 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x, 14.x, 16.x]
|
||||
node-version: [12.x, 14.x, 16.x, 18.x]
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
@@ -96,7 +96,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
|
||||
@@ -93,6 +93,13 @@ Please check it https://www.smarthomejetzt.de/mit-iobroker-auf-eine-home-assista
|
||||
-->
|
||||
|
||||
## Changelog
|
||||
### 1.2.0 (2022-06-17)
|
||||
* (Apollon77) IMPORTANT: Replace special characters in entity attribute names with an underscore! Object IDs might change!
|
||||
* (Apollon77) make sure a "null" value in state changes is not crashing
|
||||
|
||||
### 1.1.2 (2022-03-29)
|
||||
* (Apollon77) Fix crash cases reported by Sentry
|
||||
|
||||
### 1.1.1 (2022-03-25)
|
||||
* (Apollon77) Show password fields masked again in config
|
||||
|
||||
|
||||
+63
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"common": {
|
||||
"name": "hass",
|
||||
"version": "1.1.1",
|
||||
"version": "1.2.0",
|
||||
"title": "Home Assistant",
|
||||
"titleLang": {
|
||||
"en": "Home Assistant",
|
||||
@@ -28,6 +28,30 @@
|
||||
"zh-cn": "ioBroker 的家庭助理连接"
|
||||
},
|
||||
"news": {
|
||||
"1.2.0": {
|
||||
"en": "IMPORTANT: Replace special characters in entity attribute names with an underscore! Object IDs might change!\nmake sure a \"null\" value in state changes is not crashing",
|
||||
"de": "WICHTIG: Ersetzen Sie Sonderzeichen in Namen des Attributes der Einheit mit einem Unterpunkt! Objekt-IDs können sich ändern!\nsicherstellen, dass ein nullwert bei zustandsänderungen nicht abstürzt",
|
||||
"ru": "ВАЖНО: Замените специальные символы в имени сущности с подчеркиванием! ID объекта может измениться!\nубедитесь, что значение null в государственных изменениях не падает",
|
||||
"pt": "IMPORTANTE: Substitua caracteres especiais em nomes de atributos de entidade com um sublinhado! IDs de objeto podem mudar!\ncertifique-se de que um valor nulo em mudanças de estado não está caindo",
|
||||
"nl": "Vervang speciale personages in entiteitsadvocaten met een onderscore! ID's kunnen veranderen!\nzorg ervoor dat een waarde van de staat niet crasht",
|
||||
"fr": "IMPORTANT: Remplacer les caractères spéciaux dans les noms d'attributs d'entité par un accent! Les identifiants d'objet peuvent changer !\ns'assurer qu'une valeur nulle dans les changements d'état ne s'écrase pas",
|
||||
"it": "IMPORTANTE: Sostituisci caratteri speciali in nomi attributo entità con un underscore! Gli ID degli Oggetti potrebbero cambiare!\nassicurarsi che un valore nullo nei cambiamenti di stato non è crash",
|
||||
"es": "IMPORTANTE: Reemplazar caracteres especiales en nombres de atributos de entidad con un subrayado! ¡Las identificaciones de objetos pueden cambiar!\nasegúrese de que un valor nulo en los cambios estatales no se estrella",
|
||||
"pl": "IMPORTANT: Replace special characters in identity attribution names with an underscore! (ang.). Zmiany obiektów mogą się zmieniać!\nniewątpliwą wartością w zmianach stanowych nie jest rozbicie się",
|
||||
"zh-cn": "IMPORTANT:将实体的特色性改为强调的! 目标国际组织可能改变!\n确保在国家变化中确保无效不失"
|
||||
},
|
||||
"1.1.2": {
|
||||
"en": "Fix crash cases reported by Sentry",
|
||||
"de": "Von Sentry gemeldete Absturzfälle beheben",
|
||||
"ru": "Исправить случаи сбоев, о которых сообщил Sentry",
|
||||
"pt": "Corrigir casos de travamento relatados pelo Sentinela",
|
||||
"nl": "Herstel crashgevallen gemeld door Sentry",
|
||||
"fr": "Correction des cas de plantage signalés par Sentry",
|
||||
"it": "Risolvi i casi di crash segnalati da Sentry",
|
||||
"es": "Solucionar casos de fallas informados por Sentry",
|
||||
"pl": "Napraw przypadki awarii zgłoszone przez Sentry",
|
||||
"zh-cn": "修复 Sentry 报告的崩溃案例"
|
||||
},
|
||||
"1.1.1": {
|
||||
"en": "Show password fields masked again in config",
|
||||
"de": "Passwortfelder in config wieder maskiert anzeigen",
|
||||
@@ -165,6 +189,44 @@
|
||||
"agree",
|
||||
"cancel"
|
||||
]
|
||||
},
|
||||
{
|
||||
"condition": {
|
||||
"operand": "and",
|
||||
"rules": [
|
||||
"oldVersion<1.2.0",
|
||||
"newVersion>=1.2.0"
|
||||
]
|
||||
},
|
||||
"title": {
|
||||
"en": "Important notice!",
|
||||
"de": "Wichtiger Hinweis!",
|
||||
"ru": "Важное замечание!",
|
||||
"pt": "Notícia importante!",
|
||||
"nl": "Belangrijke mededeling!",
|
||||
"fr": "Avis important!",
|
||||
"it": "Avviso IMPORTANTE!",
|
||||
"es": "Noticia importante!",
|
||||
"pl": "Ważna uwaga!",
|
||||
"zh-cn": "重要通知!"
|
||||
},
|
||||
"text": {
|
||||
"en": "The new version 1.2.x will potentially change the Names of Objects when special characters like \".\", \"-\" or spaces were used in entity attributes! Please delete the old objects manually if needed.",
|
||||
"de": "Die neue Version 1.2.x wird die Namen von Objekten möglicherweise ändern, wenn spezielle Zeichen wie \".\", \"-\" oder Leerzeichen in Entity-Attributen verwendet wurden! Alten Objekte bitte bei Bedarf manuell löschen.",
|
||||
"ru": "Новая версия 1.2.x будет потенциально менять имена объектов, когда специальные символы типа \".\", \"-\" или пространства были использованы в атрибутах лица! Пожалуйста, удалите старые объекты вручную, если это необходимо.",
|
||||
"pt": "A nova versão 1.2.x irá potencialmente alterar os Nomes de Objetos quando caracteres especiais como \".\", \"-\" ou espaços foram usados em atributos de entidade! Por favor, exclua os objetos antigos manualmente, se necessário.",
|
||||
"nl": "De nieuwe versie 1.2.x zal de Namen van Objects veranderen als speciale personages zoals \", \" of ruimtes werden gebruikt in entiteitsaanklachten! Verwijder de oude objecten handmatig als het nodig is.",
|
||||
"fr": "La nouvelle version 1.2.x modifiera potentiellement les Noms des Objets lorsque des caractères spéciaux comme \", \"-\" ou des espaces ont été utilisés dans des attributs d'entité ! Veuillez supprimer les anciens objets manuellement si nécessaire.",
|
||||
"it": "La nuova versione 1.2.x cambierà potenzialmente i nomi degli oggetti quando caratteri speciali come \".\", \"-\" o spazi sono stati utilizzati negli attributi dell'entità! Si prega di eliminare i vecchi oggetti manualmente se necessario.",
|
||||
"es": "La nueva versión 1.2.x potencialmente cambiará los Nombres de Objetos cuando caracteres especiales como \"., \"-\" o espacios fueron utilizados en atributos de entidad! Por favor, borre los viejos objetos manualmente si es necesario.",
|
||||
"pl": "Nowa wersja 1.2.x będzie potencjalnie zmieniać nazwy obiektów, kiedy szczególne postacie takie jak „.”, „-” lub przestrzenie były używane w atrybutach. Okazuje się, że stare obiekty ręcznie będą potrzebne.",
|
||||
"zh-cn": "新版本1.2.x将可能改变物体的名称,如“......”、“-”或空间在实体的属性中使用。 请在必要时删除旧物体。."
|
||||
},
|
||||
"level": "warn",
|
||||
"buttons": [
|
||||
"agree",
|
||||
"cancel"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -42,7 +42,7 @@ function startAdapter(options) {
|
||||
let requestFields = {};
|
||||
if (typeof state.val === 'string') {
|
||||
try {
|
||||
requestFields = JSON.parse(state.val);
|
||||
requestFields = JSON.parse(state.val) || {};
|
||||
} catch (err) {
|
||||
adapter.log.info(`Ignore data for service call ${id} is no valid JSON: ${err.message}`);
|
||||
requestFields = {};
|
||||
@@ -284,7 +284,7 @@ function parseStates(entities, services, callback) {
|
||||
}
|
||||
|
||||
obj = {
|
||||
_id: `${adapter.namespace}.entities.${entity.entity_id}.${attr}`,
|
||||
_id: `${adapter.namespace}.entities.${entity.entity_id}.${attr.replace(adapter.FORBIDDEN_CHARS, '_')}`,
|
||||
type: 'state',
|
||||
common: common,
|
||||
native: {
|
||||
@@ -383,14 +383,14 @@ function main() {
|
||||
}
|
||||
if (entity.attributes) {
|
||||
for (const attr in entity.attributes) {
|
||||
if (!entity.attributes.hasOwnProperty(attr) || attr === 'friendly_name' || attr === 'unit_of_measurement' || attr === 'icon') {
|
||||
if (!entity.attributes.hasOwnProperty(attr) || attr === 'friendly_name' || attr === 'unit_of_measurement' || attr === 'icon'|| !attr.length) {
|
||||
continue;
|
||||
}
|
||||
let val = entity.attributes[attr];
|
||||
if ((typeof val === 'object' && val !== null) || Array.isArray(val)) {
|
||||
val = JSON.stringify(val);
|
||||
}
|
||||
adapter.setForeignState(id + attr, {val, ack: true, lc, ts});
|
||||
adapter.setForeignState(id + attr.replace(adapter.FORBIDDEN_CHARS, '_'), {val, ack: true, lc, ts});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
+7
-7
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "iobroker.hass",
|
||||
"version": "1.1.1",
|
||||
"version": "1.2.0",
|
||||
"description": "Home Assistant",
|
||||
"author": {
|
||||
"name": "bluefox",
|
||||
@@ -26,16 +26,16 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"websocket": "^1.0.34",
|
||||
"ws": "^8.5.0",
|
||||
"ws": "^8.8.0",
|
||||
"@iobroker/adapter-core": "^2.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@alcalzone/release-script": "^3.5.6",
|
||||
"@alcalzone/release-script-plugin-iobroker": "^3.5.7",
|
||||
"@alcalzone/release-script-plugin-license": "^3.5.3",
|
||||
"axios": "^0.26.1",
|
||||
"@alcalzone/release-script": "^3.5.9",
|
||||
"@alcalzone/release-script-plugin-iobroker": "^3.5.9",
|
||||
"@alcalzone/release-script-plugin-license": "^3.5.9",
|
||||
"axios": "^0.27.2",
|
||||
"gulp": "^4.0.2",
|
||||
"mocha": "^9.2.2",
|
||||
"mocha": "^10.0.0",
|
||||
"chai": "^4.3.6"
|
||||
},
|
||||
"main": "main.js",
|
||||
|
||||
Reference in New Issue
Block a user