diff --git a/.gitignore b/.gitignore index c324e6a..2d6747a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,5 @@ /.homeybuild/ /.vscode/* !/.vscode/settings.json -/locales/ /node_modules/ -/app.json /env.json \ No newline at end of file diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..5fae996 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +/locales/ +/app.json \ No newline at end of file diff --git a/app.json b/app.json new file mode 100644 index 0000000..1ba6542 --- /dev/null +++ b/app.json @@ -0,0 +1,250 @@ +{ + "_comment": "This file is generated. Please edit .homeycompose/app.json instead.", + "id": "com.ariston", + "sdk": 3, + "brandColor": "#c8102e", + "name": { + "en": "Ariston" + }, + "description": { + "en": "Control" + }, + "category": [ + "climate" + ], + "version": "1.0.0", + "compatibility": ">=5.0.0", + "tags": { + "en": [ + "ariston" + ] + }, + "images": { + "small": "/assets/images/small.png", + "large": "/assets/images/large.png", + "xlarge": "/assets/images/xlarge.png" + }, + "author": { + "name": "Olivier Zalmanski", + "email": "olivier.zalmanski@me.com" + }, + "bugs": { + "url": "https://github.com/OlivierZal/com.ariston/issues" + }, + "source": "https://github.com/OlivierZal/com.ariston", + "support": "https://github.com/OlivierZal/com.ariston/issues", + "contributing": { + "donate": { + "paypal": { + "username": "OlivierZalmanski" + } + } + }, + "platforms": [ + "local" + ], + "drivers": [ + { + "images": { + "large": "/drivers/nuos/assets/images/large.png", + "small": "/drivers/nuos/assets/images/small.png" + }, + "icon": "/drivers/nuos/assets/icon.svg", + "class": "heater", + "pair": [ + { + "id": "login", + "template": "login_credentials", + "navigation": { + "next": "list_devices" + }, + "options": { + "logo": "logo.png", + "usernameLabel": { + "en": "Username", + "fr": "Nom d'utilisateur" + }, + "usernamePlaceholder": { + "en": "user@domain.com", + "fr": "utilisateur@domain.fr" + }, + "passwordLabel": { + "en": "Password", + "fr": "Mot de passe" + }, + "passwordPlaceholder": { + "en": "P4ssw0rd", + "fr": "P4ssw0rd" + } + } + }, + { + "id": "list_devices", + "template": "list_devices", + "navigation": { + "next": "add_devices" + } + }, + { + "id": "add_devices", + "template": "add_devices" + } + ], + "repair": [ + { + "id": "login", + "template": "login_credentials", + "options": { + "logo": "logo.png", + "usernameLabel": { + "en": "Username", + "fr": "Nom d'utilisateur" + }, + "usernamePlaceholder": { + "en": "user@domain.com", + "fr": "utilisateur@domain.fr" + }, + "passwordLabel": { + "en": "Password", + "fr": "Mot de passe" + }, + "passwordPlaceholder": { + "en": "P4ssw0rd", + "fr": "P4ssw0rd" + } + } + } + ], + "name": { + "en": "Nuos" + }, + "capabilities": [ + "operation_mode", + "measure_temperature", + "measure_temperature.required", + "mode", + "onoff", + "onoff.boost", + "target_temperature" + ], + "capabilitiesOptions": { + "measure_temperature.required": { + "title": { + "en": "Process required temperature" + } + }, + "onoff.boost": { + "title": { + "en": "Boost" + } + }, + "target_temperature": { + "min": 40, + "max": 75, + "step": 1 + } + }, + "id": "nuos", + "settings": [ + { + "id": "options", + "type": "group", + "label": { + "en": "Options", + "fr": "Options", + "nl": "Opties", + "sv": "Alternativ", + "no": "Alternativer", + "da": "Indstillinger", + "es": "Opciones" + }, + "children": [ + { + "id": "always_on", + "type": "checkbox", + "label": { + "en": "Disable shutdown from Homey", + "fr": "Désactiver l'extinction depuis Homey", + "nl": "Schakel uitschakeling van Homey uit", + "sv": "Inaktivera avstängning från Homey", + "no": "Deaktiver avstenging fra Homey", + "da": "Deaktiver slukning fra Homey", + "es": "Desactivar apagado desde Homey" + }, + "value": false, + "hint": { + "en": "This setting prevents the device from being switched off from Homey, it can still be switched off manually (from a remote control or from the physical device)", + "fr": "Ce paramètre empêche l'appareil d'être éteint depuis Homey, il peut toujours être éteint manuellement (à partir d'une télécommande ou depuis l'appareil physique)", + "nl": "Deze instelling voorkomt dat het apparaat door Homey kan worden uitgeschakeld, het kan nog steeds handmatig worden uitgeschakeld (met een afstandsbediening of vanaf het fysieke apparaat)", + "sv": "Detta alternativ förhindrar att enheten stängs av från Homey, den kan fortfarande stängas av manuellt (från en fjärrkontroll eller från det fysiska enheten)", + "no": "Denne innstillingen forhindrer at enheten blir skrudd av fra Homey, den kan fortsatt skrus av manuelt (fra en fjernkontroll eller fra den fysiske enheten)", + "da": "Denne indstilling forhindrer, at enheden slukkes fra Homey, den kan stadig slukkes manuelt (fra en fjernbetjening eller fra den fysiske enhed)", + "es": "Esta configuración evita que el dispositivo se apague desde Homey, todavía se puede apagar manualmente (desde un mando a distancia o desde el dispositivo físico)" + } + } + ] + } + ] + } + ], + "capabilities": { + "mode": { + "type": "enum", + "title": { + "en": "Mode" + }, + "getable": true, + "setable": true, + "uiComponent": "picker", + "values": [ + { + "id": "auto", + "title": { + "en": "Automatic" + } + }, + { + "id": "manual", + "title": { + "en": "Manual" + } + } + ] + }, + "operation_mode": { + "type": "enum", + "title": { + "en": "Operation mode" + }, + "getable": true, + "setable": true, + "uiComponent": "picker", + "values": [ + { + "id": "green", + "title": { + "en": "Green" + } + }, + { + "id": "comfort", + "title": { + "en": "Comfort" + } + }, + { + "id": "fast", + "title": { + "en": "Fast" + } + }, + { + "id": "auto", + "title": { + "en": "Automatic (i-Memory)" + } + } + ] + } + } +} \ No newline at end of file diff --git a/locales/en.json b/locales/en.json new file mode 100644 index 0000000..1b8f8a4 --- /dev/null +++ b/locales/en.json @@ -0,0 +1,5 @@ +{ + "warnings": { + "always_on": "Shutdown from Homey has been disabled." + } +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index ec5a4ab..66e2d83 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,8 +20,8 @@ "@types/luxon": "^3.3.5", "@types/node": "^20.10.0", "@types/tough-cookie": "^4.0.5", - "@typescript-eslint/eslint-plugin": "^6.12.0", - "@typescript-eslint/parser": "^6.12.0", + "@typescript-eslint/eslint-plugin": "^6.13.0", + "@typescript-eslint/parser": "^6.13.0", "eslint": "^8.54.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-config-prettier": "^9.0.0", @@ -442,9 +442,9 @@ } }, "node_modules/@types/semver": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.5.tgz", - "integrity": "sha512-+d+WYC1BxJ6yVOgUgzK8gWvp5qF8ssV5r4nsDcZWKRWcDQLQ619tvWAxJQYGgBrO1MnLJC7a5GtiYsAoQ47dJg==", + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", + "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", "dev": true }, "node_modules/@types/tough-cookie": { @@ -454,16 +454,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.12.0.tgz", - "integrity": "sha512-XOpZ3IyJUIV1b15M7HVOpgQxPPF7lGXgsfcEIu3yDxFPaf/xZKt7s9QO/pbk7vpWQyVulpJbu4E5LwpZiQo4kA==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.13.0.tgz", + "integrity": "sha512-HTvbSd0JceI2GW5DHS3R9zbarOqjkM9XDR7zL8eCsBUO/eSiHcoNE7kSL5sjGXmVa9fjH5LCfHDXNnH4QLp7tQ==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.12.0", - "@typescript-eslint/type-utils": "6.12.0", - "@typescript-eslint/utils": "6.12.0", - "@typescript-eslint/visitor-keys": "6.12.0", + "@typescript-eslint/scope-manager": "6.13.0", + "@typescript-eslint/type-utils": "6.13.0", + "@typescript-eslint/utils": "6.13.0", + "@typescript-eslint/visitor-keys": "6.13.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -489,15 +489,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.12.0.tgz", - "integrity": "sha512-s8/jNFPKPNRmXEnNXfuo1gemBdVmpQsK1pcu+QIvuNJuhFzGrpD7WjOcvDc/+uEdfzSYpNu7U/+MmbScjoQ6vg==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.13.0.tgz", + "integrity": "sha512-VpG+M7GNhHLI/aTDctqAV0XbzB16vf+qDX9DXuMZSe/0bahzDA9AKZB15NDbd+D9M4cDsJvfkbGOA7qiZ/bWJw==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.12.0", - "@typescript-eslint/types": "6.12.0", - "@typescript-eslint/typescript-estree": "6.12.0", - "@typescript-eslint/visitor-keys": "6.12.0", + "@typescript-eslint/scope-manager": "6.13.0", + "@typescript-eslint/types": "6.13.0", + "@typescript-eslint/typescript-estree": "6.13.0", + "@typescript-eslint/visitor-keys": "6.13.0", "debug": "^4.3.4" }, "engines": { @@ -517,13 +517,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.12.0.tgz", - "integrity": "sha512-5gUvjg+XdSj8pcetdL9eXJzQNTl3RD7LgUiYTl8Aabdi8hFkaGSYnaS6BLc0BGNaDH+tVzVwmKtWvu0jLgWVbw==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.13.0.tgz", + "integrity": "sha512-2x0K2/CujsokIv+LN2T0l5FVDMtsCjkUyYtlcY4xxnxLAW+x41LXr16duoicHpGtLhmtN7kqvuFJ3zbz00Ikhw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.12.0", - "@typescript-eslint/visitor-keys": "6.12.0" + "@typescript-eslint/types": "6.13.0", + "@typescript-eslint/visitor-keys": "6.13.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -534,13 +534,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.12.0.tgz", - "integrity": "sha512-WWmRXxhm1X8Wlquj+MhsAG4dU/Blvf1xDgGaYCzfvStP2NwPQh6KBvCDbiOEvaE0filhranjIlK/2fSTVwtBng==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.13.0.tgz", + "integrity": "sha512-YHufAmZd/yP2XdoD3YeFEjq+/Tl+myhzv+GJHSOz+ro/NFGS84mIIuLU3pVwUcauSmwlCrVXbBclkn1HfjY0qQ==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.12.0", - "@typescript-eslint/utils": "6.12.0", + "@typescript-eslint/typescript-estree": "6.13.0", + "@typescript-eslint/utils": "6.13.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -561,9 +561,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.12.0.tgz", - "integrity": "sha512-MA16p/+WxM5JG/F3RTpRIcuOghWO30//VEOvzubM8zuOOBYXsP+IfjoCXXiIfy2Ta8FRh9+IO9QLlaFQUU+10Q==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.13.0.tgz", + "integrity": "sha512-oXg7DFxx/GmTrKXKKLSoR2rwiutOC7jCQ5nDH5p5VS6cmHE1TcPTaYQ0VPSSUvj7BnNqCgQ/NXcTBxn59pfPTQ==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -574,13 +574,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.12.0.tgz", - "integrity": "sha512-vw9E2P9+3UUWzhgjyyVczLWxZ3GuQNT7QpnIY3o5OMeLO/c8oHljGc8ZpryBMIyympiAAaKgw9e5Hl9dCWFOYw==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.13.0.tgz", + "integrity": "sha512-IT4O/YKJDoiy/mPEDsfOfp+473A9GVqXlBKckfrAOuVbTqM8xbc0LuqyFCcgeFWpqu3WjQexolgqN2CuWBYbog==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.12.0", - "@typescript-eslint/visitor-keys": "6.12.0", + "@typescript-eslint/types": "6.13.0", + "@typescript-eslint/visitor-keys": "6.13.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -601,17 +601,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.12.0.tgz", - "integrity": "sha512-LywPm8h3tGEbgfyjYnu3dauZ0U7R60m+miXgKcZS8c7QALO9uWJdvNoP+duKTk2XMWc7/Q3d/QiCuLN9X6SWyQ==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.13.0.tgz", + "integrity": "sha512-V+txaxARI8yznDkcQ6FNRXxG+T37qT3+2NsDTZ/nKLxv6VfGrRhTnuvxPUxpVuWWr+eVeIxU53PioOXbz8ratQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.12.0", - "@typescript-eslint/types": "6.12.0", - "@typescript-eslint/typescript-estree": "6.12.0", + "@typescript-eslint/scope-manager": "6.13.0", + "@typescript-eslint/types": "6.13.0", + "@typescript-eslint/typescript-estree": "6.13.0", "semver": "^7.5.4" }, "engines": { @@ -626,12 +626,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.12.0.tgz", - "integrity": "sha512-rg3BizTZHF1k3ipn8gfrzDXXSFKyOEB5zxYXInQ6z0hUvmQlhaZQzK+YmHmNViMA9HzW5Q9+bPPt90bU6GQwyw==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.13.0.tgz", + "integrity": "sha512-UQklteCEMCRoq/1UhKFZsHv5E4dN1wQSzJoxTfABasWk1HgJRdg1xNUve/Kv/Sdymt4x+iEzpESOqRFlQr/9Aw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.12.0", + "@typescript-eslint/types": "6.13.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { diff --git a/package.json b/package.json index 1375d87..2027796 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,8 @@ "@types/luxon": "^3.3.5", "@types/node": "^20.10.0", "@types/tough-cookie": "^4.0.5", - "@typescript-eslint/eslint-plugin": "^6.12.0", - "@typescript-eslint/parser": "^6.12.0", + "@typescript-eslint/eslint-plugin": "^6.13.0", + "@typescript-eslint/parser": "^6.13.0", "eslint": "^8.54.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-config-prettier": "^9.0.0",