Compare commits

...
11 Commits
Author SHA1 Message Date
Ingo Fischer b54916d743 chore: release v1.2.0
* (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
2022-06-17 23:23:11 +02:00
Ingo Fischer 52d8bddb11 * (Apollon77) make sure a "null" value in state changes is not crashing 2022-06-17 23:20:26 +02:00
dependabot[bot]andGitHub 271bd03d14 Update @alcalzone/release-script requirement from ^3.5.8 to ^3.5.9 (#53) 2022-06-01 09:45:24 +00:00
dependabot[bot]andGitHub 36bc7c99fd Update @alcalzone/release-script-plugin-license requirement (#51) 2022-06-01 07:48:32 +00:00
dependabot[bot]andGitHub cc76a49d62 Update @alcalzone/release-script-plugin-iobroker requirement (#54) 2022-06-01 07:05:24 +00:00
dependabot[bot]andGitHub 7a2475ba02 Update @alcalzone/release-script-plugin-license requirement (#47) 2022-05-01 14:15:54 +00:00
dependabot[bot]andGitHub 47cb4cfad8 Update @alcalzone/release-script requirement from ^3.5.6 to ^3.5.8 (#49) 2022-05-01 11:54:23 +00:00
dependabot[bot]andGitHub 2a473f88b0 Update @alcalzone/release-script-plugin-iobroker requirement (#48) 2022-05-01 09:16:22 +00:00
dependabot[bot]andGitHub 245032a178 Bump axios from 0.26.1 to 0.27.2 (#46) 2022-05-01 05:37:18 +00:00
BluefoxandGitHub 96e6c5b471 Merge pull request #45 from ioBroker/dependabot/github_actions/actions/checkout-3
Bump actions/checkout from 2 to 3
2022-04-03 14:39:36 +02:00
dependabot[bot]andGitHub 82614cdad0 Bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-01 04:20:10 +00:00
6 changed files with 70 additions and 16 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Check if PR should be auto-merged - name: Check if PR should be auto-merged
uses: ahmadnassri/action-dependabot-auto-merge@v2 uses: ahmadnassri/action-dependabot-auto-merge@v2
+4 -4
View File
@@ -28,7 +28,7 @@ jobs:
node-version: [12.x] node-version: [12.x]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
@@ -56,11 +56,11 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: 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] os: [ubuntu-latest, windows-latest, macos-latest]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
@@ -96,7 +96,7 @@ jobs:
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3 uses: actions/setup-node@v3
+4
View File
@@ -93,6 +93,10 @@ Please check it https://www.smarthomejetzt.de/mit-iobroker-auf-eine-home-assista
--> -->
## Changelog ## 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) ### 1.1.2 (2022-03-29)
* (Apollon77) Fix crash cases reported by Sentry * (Apollon77) Fix crash cases reported by Sentry
+51 -1
View File
@@ -1,7 +1,7 @@
{ {
"common": { "common": {
"name": "hass", "name": "hass",
"version": "1.1.2", "version": "1.2.0",
"title": "Home Assistant", "title": "Home Assistant",
"titleLang": { "titleLang": {
"en": "Home Assistant", "en": "Home Assistant",
@@ -28,6 +28,18 @@
"zh-cn": "ioBroker 的家庭助理连接" "zh-cn": "ioBroker 的家庭助理连接"
}, },
"news": { "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": { "1.1.2": {
"en": "Fix crash cases reported by Sentry", "en": "Fix crash cases reported by Sentry",
"de": "Von Sentry gemeldete Absturzfälle beheben", "de": "Von Sentry gemeldete Absturzfälle beheben",
@@ -177,6 +189,44 @@
"agree", "agree",
"cancel" "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"
]
} }
] ]
}, },
+3 -3
View File
@@ -42,7 +42,7 @@ function startAdapter(options) {
let requestFields = {}; let requestFields = {};
if (typeof state.val === 'string') { if (typeof state.val === 'string') {
try { try {
requestFields = JSON.parse(state.val); requestFields = JSON.parse(state.val) || {};
} catch (err) { } catch (err) {
adapter.log.info(`Ignore data for service call ${id} is no valid JSON: ${err.message}`); adapter.log.info(`Ignore data for service call ${id} is no valid JSON: ${err.message}`);
requestFields = {}; requestFields = {};
@@ -284,7 +284,7 @@ function parseStates(entities, services, callback) {
} }
obj = { obj = {
_id: `${adapter.namespace}.entities.${entity.entity_id}.${attr}`, _id: `${adapter.namespace}.entities.${entity.entity_id}.${attr.replace(adapter.FORBIDDEN_CHARS, '_')}`,
type: 'state', type: 'state',
common: common, common: common,
native: { native: {
@@ -390,7 +390,7 @@ function main() {
if ((typeof val === 'object' && val !== null) || Array.isArray(val)) { if ((typeof val === 'object' && val !== null) || Array.isArray(val)) {
val = JSON.stringify(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
View File
@@ -1,6 +1,6 @@
{ {
"name": "iobroker.hass", "name": "iobroker.hass",
"version": "1.1.2", "version": "1.2.0",
"description": "Home Assistant", "description": "Home Assistant",
"author": { "author": {
"name": "bluefox", "name": "bluefox",
@@ -26,16 +26,16 @@
}, },
"dependencies": { "dependencies": {
"websocket": "^1.0.34", "websocket": "^1.0.34",
"ws": "^8.5.0", "ws": "^8.8.0",
"@iobroker/adapter-core": "^2.6.0" "@iobroker/adapter-core": "^2.6.0"
}, },
"devDependencies": { "devDependencies": {
"@alcalzone/release-script": "^3.5.6", "@alcalzone/release-script": "^3.5.9",
"@alcalzone/release-script-plugin-iobroker": "^3.5.7", "@alcalzone/release-script-plugin-iobroker": "^3.5.9",
"@alcalzone/release-script-plugin-license": "^3.5.3", "@alcalzone/release-script-plugin-license": "^3.5.9",
"axios": "^0.26.1", "axios": "^0.27.2",
"gulp": "^4.0.2", "gulp": "^4.0.2",
"mocha": "^9.2.2", "mocha": "^10.0.0",
"chai": "^4.3.6" "chai": "^4.3.6"
}, },
"main": "main.js", "main": "main.js",