Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,6 @@ it("Should connect to API with demo credentials", async () => {
- `admin/` - Admin UI configuration (JSON Config) and translations
- `lib/` - Shared libraries and utilities
- `lib/stateAttr.js` - State attribute definitions for meter readings
- `lib/tools.js` - Utility functions including translation tools
- `lib/adapter-config.d.ts` - TypeScript definitions for adapter config
- `test/` - Test files (package, integration, unit, mocha setup)
- `.github/workflows/` - CI/CD configuration (test-and-release.yml)
Expand Down
1 change: 1 addition & 0 deletions admin/i18n/de/translations.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"Password": "Kennwort",
"Seconds between data polling": "Sekunden zwischen den Datenabfragen",
"Username": "Benutzername",
"Your Discovergy Username": "Ihr Discovergy-Benutzername",
"discovergy adapter settings": "Adaptereinstellungen für discovergy",
Expand Down
1 change: 1 addition & 0 deletions admin/i18n/es/translations.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"Password": "La opción 2 no es",
"Seconds between data polling": "Segundos entre sondeos de datos",
"Username": "La opción 1 es genial",
"Your Discovergy Username": "Su nombre de usuario de Discovergy",
"discovergy adapter settings": "Ajustes del adaptador para discovergy",
Expand Down
1 change: 1 addition & 0 deletions admin/i18n/fr/translations.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"Password": "L'option 2 n'est pas",
"Seconds between data polling": "Secondes entre les interrogations de données",
"Username": "L'option 1 est cool",
"Your Discovergy Username": "Votre nom d'utilisateur Discovergy",
"discovergy adapter settings": "Paramètres d'adaptateur pour discovergy",
Expand Down
1 change: 1 addition & 0 deletions admin/i18n/it/translations.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"Password": "L'opzione 2 no",
"Seconds between data polling": "Secondi tra i polling dei dati",
"Username": "L'opzione 1 è cool",
"Your Discovergy Username": "Il tuo nome utente Discovergy",
"discovergy adapter settings": "Impostazioni dell'adattatore per discovergy",
Expand Down
1 change: 1 addition & 0 deletions admin/i18n/nl/translations.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"Password": "Optie 2 is dat niet",
"Seconds between data polling": "Seconden tussen het ophalen van gegevens",
"Username": "Optie 1 is cool",
"Your Discovergy Username": "Uw Discoverygy-gebruikersnaam",
"discovergy adapter settings": "Adapterinstellingen voor discovergy",
Expand Down
1 change: 1 addition & 0 deletions admin/i18n/pl/translations.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"Password": "Opcja 2 nie jest",
"Seconds between data polling": "Sekundy między odpytywaniem danych",
"Username": "Opcja 1 jest fajna",
"Your Discovergy Username": "Twoja nazwa użytkownika Discovery",
"discovergy adapter settings": "Ustawienia adaptera dla discovergy",
Expand Down
1 change: 1 addition & 0 deletions admin/i18n/pt/translations.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"Password": "A opção 2 não é",
"Seconds between data polling": "Segundos entre as consultas de dados",
"Username": "Opção 1 é legal",
"Your Discovergy Username": "Seu nome de usuário do Discovergy",
"discovergy adapter settings": "Configurações do adaptador para discovergy",
Expand Down
1 change: 1 addition & 0 deletions admin/i18n/ru/translations.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"Password": "Вариант 2 не",
"Seconds between data polling": "Секунды между опросами данных",
"Username": "Вариант 1 - это круто",
"Your Discovergy Username": "Ваше имя пользователя Discovery",
"discovergy adapter settings": "Настройки адаптера для discovergy",
Expand Down
1 change: 1 addition & 0 deletions admin/i18n/uk/translations.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"Password": "Пароль",
"Seconds between data polling": "Секунди між опитуваннями даних",
"Username": "Ім'я користувача",
"Your Discovergy Username": "Ваше ім'я користувача Discovergy",
"discovergy adapter settings": "Налаштування адаптера discovergy",
Expand Down
1 change: 1 addition & 0 deletions admin/i18n/zh-cn/translations.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"Password": "密码",
"Seconds between data polling": "数据轮询间隔秒数",
"Username": "用户名",
"Your Discovergy Username": "您的发现用户名",
"discovergy adapter settings": "用于发现的适配器设置",
Expand Down
121 changes: 0 additions & 121 deletions lib/tools.js

This file was deleted.

6 changes: 3 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

class Discovergy extends utils.Adapter {
/**
* @param {Partial<ioBroker.AdapterOptions>} [options]

Check warning on line 22 in main.js

View workflow job for this annotation

GitHub Actions / check-and-lint

Missing JSDoc @PARAM "options" description
*/
constructor(options) {
// @ts-expect-error - Parent property exists but not typed in adapter options
Expand Down Expand Up @@ -201,9 +201,9 @@

// New data polling at intervall time
if (timer) {
clearTimeout(timer);
this.clearTimeout(timer);
}
timer = setTimeout(() => {
timer = this.setTimeout(() => {
this.dataPolling();
}, settings.intervall);
}
Expand Down Expand Up @@ -448,14 +448,14 @@
/**
* Is called when adapter shuts down - callback has to be called under any circumstances!
*
* @param {() => void} callback

Check warning on line 451 in main.js

View workflow job for this annotation

GitHub Actions / check-and-lint

Missing JSDoc @PARAM "callback" description
*/
onUnload(callback) {
try {
this.setState('info.connection', false, true);
this.log.info('cleaned everything up...');
if (timer) {
clearTimeout(timer);
this.clearTimeout(timer);
timer = null;
}
callback();
Expand Down Expand Up @@ -483,7 +483,7 @@
if (module.parent) {
// Export the constructor in compact mode
/**
* @param {Partial<ioBroker.AdapterOptions>} [options]

Check warning on line 486 in main.js

View workflow job for this annotation

GitHub Actions / check-and-lint

Missing JSDoc @PARAM "options" description
*/
module.exports = options => new Discovergy(options);
} else {
Expand Down
Loading