Skip to content

Commit

Permalink
1.3.8
Browse files Browse the repository at this point in the history
Bugfixes
  • Loading branch information
TroRon committed Feb 19, 2024
1 parent c29b057 commit f273d47
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .homeycompose/app.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "ch.place4fun.pihole",
"version": "1.3.7",
"version": "1.3.8",
"compatibility": ">=5.0.0",
"sdk": 3,
"brandColor": "#000000",
Expand Down
13 changes: 2 additions & 11 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,9 @@ class PiHoleControl extends Homey.App {
///////////////////////////////////////////////////////////////////////////////////////

// IN PROGRESS
// Trigger registrieren


//TODO ALLE TRIGGER KARTEN
async function updateFilterStateAndTrigger() {
// Annahme: Der Filterstatus wird aktualisiert und alarmFilterState wird entsprechend gesetzt
let alarmFilterState = true; // Beispiel: Der Filter ist aktiviert

// Auslösen des Flow-Kartenereignisses "alarm_filter_state_changed"
const connectionStateTrigger = this.homey.flow.getTriggerCard('alarm_filter_state_changed');
await connectionStateTrigger.trigger({
alarm_filter_state: alarmFilterState
});
}



Expand Down
68 changes: 44 additions & 24 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"_comment": "This file is generated. Please edit .homeycompose/app.json instead.",
"id": "ch.place4fun.pihole",
"version": "1.3.7",
"version": "1.3.8",
"compatibility": ">=5.0.0",
"sdk": 3,
"brandColor": "#000000",
Expand Down Expand Up @@ -1424,17 +1424,17 @@
{
"id": "measure_ads_blocked_today_percent_changed",
"title": {
"en": "Blocked advertisements %) / day updated",
"en": "Blocked advertisements (%) / day updated",
"de": "Geblockte Werbeanzeigen (%) / Tag aktualisiert",
"nl": "Geblokkeerde advertenties %) / dag bijgewerkt",
"fr": "Publicités bloquées %) / jour mises à jour",
"it": "Pubblicità bloccate %) / giorno aggiornate",
"sv": "Blockerade annonser %) / dag uppdaterad",
"no": "Blokkerte annonser %) / dag oppdatert",
"es": "Anuncios bloqueados %) / día actualizado",
"da": "Blokerede annoncer %) / dag opdateret",
"ru": "Заблокированные объявления %) / день обновлены",
"pl": "Zablokowane reklamy %) / dzień zaktualizowany"
"nl": "Geblokkeerde advertenties (%) / dag bijgewerkt",
"fr": "Publicités bloquées (%) / jour mises à jour",
"it": "Pubblicità bloccate (%) / giorno aggiornate",
"sv": "Blockerade annonser (%) / dag uppdaterad",
"no": "Blokkerte annonser (%) / dag oppdatert",
"es": "Anuncios bloqueados (%) / día actualizado",
"da": "Blokerede annoncer (%) / dag opdateret",
"ru": "Заблокированные объявления (%) / день обновлены",
"pl": "Zablokowane reklamy (%) / dzień zaktualizowany"
},
"tokens": [
{
Expand Down Expand Up @@ -1486,20 +1486,30 @@
"name": "alarm_communication_error",
"type": "boolean",
"title": {
"en": "Connection status has changed",
"de": "Verbindungs-Status hat sich geändert",
"nl": "Verbindingsstatus is veranderd",
"fr": "Le statut de la connexion a changé",
"it": "Lo stato della connessione è cambiato",
"sv": "Anslutningsstatus har ändrats",
"no": "Tilkoblingsstatus har endret seg",
"es": "El estado de la conexión ha cambiado",
"da": "Forbindelsesstatus er ændret",
"ru": "Состояние подключения изменилось",
"pl": "Stan połączenia uległ zmianie"
"en": "Connection available?",
"de": "Verbindung vorhanden?",
"nl": "Verbinding beschikbaar?",
"fr": "Connexion disponible?",
"it": "Connessione disponibile?",
"sv": "Anslutning tillgänglig?",
"no": "Tilkobling tilgjengelig?",
"es": "Conexión disponible?",
"da": "Forbindelse tilgængelig?",
"ru": "Подключение доступно?",
"pl": "Połączenie dostępne?"
},
"example": {
"en": "True / False"
"en": "Yes / No",
"de": "Ja / Nein",
"nl": "Ja / Nee",
"fr": "Oui / Non",
"it": "Sì / No",
"sv": "Ja / Nej",
"no": "Ja / Nei",
"es": "Sí / No",
"da": "Ja / Nej",
"ru": "Да / Нет",
"pl": "Tak / Nie"
}
}
],
Expand Down Expand Up @@ -1544,7 +1554,17 @@
"pl": "Filtr aktywny?"
},
"example": {
"en": "True / False"
"en": "Yes / No",
"de": "Ja / Nein",
"nl": "Ja / Nee",
"fr": "Oui / Non",
"it": "Sì / No",
"sv": "Ja / Nej",
"no": "Ja / Nei",
"es": "Sí / No",
"da": "Ja / Nej",
"ru": "Да / Нет",
"pl": "Tak / Nie"
}
}
],
Expand Down
7 changes: 7 additions & 0 deletions drivers/pihole/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,13 @@ async _updateDeviceData(url) {
this.log('PiHole Control: Fehler --> dns_queries_today ist nicht definiert');
}

if (dns_queries_today !== undefined) {
formatted_dns_queries_today = dns_queries_today.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1'");
} else {
// Wenn dns_queries_today nicht definiert ist, setzen Sie formatted_dns_queries_today auf einen Standardwert oder handhaben Sie den Fall entsprechend
formatted_dns_queries_today = 'N/A';
}

if (typeof data.ads_blocked_today !== 'undefined') {
let blocked_adds_today = data.ads_blocked_today;
let formatted_blocked_adds_today = blocked_adds_today.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1'");
Expand Down
20 changes: 10 additions & 10 deletions drivers/pihole/driver.flow.compose.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,17 @@
{
"id": "measure_ads_blocked_today_percent_changed",
"title": {
"en": "Blocked advertisements %) / day updated",
"en": "Blocked advertisements (%) / day updated",
"de": "Geblockte Werbeanzeigen (%) / Tag aktualisiert",
"nl": "Geblokkeerde advertenties %) / dag bijgewerkt",
"fr": "Publicités bloquées %) / jour mises à jour",
"it": "Pubblicità bloccate %) / giorno aggiornate",
"sv": "Blockerade annonser %) / dag uppdaterad",
"no": "Blokkerte annonser %) / dag oppdatert",
"es": "Anuncios bloqueados %) / día actualizado",
"da": "Blokerede annoncer %) / dag opdateret",
"ru": "Заблокированные объявления %) / день обновлены",
"pl": "Zablokowane reklamy %) / dzień zaktualizowany"
"nl": "Geblokkeerde advertenties (%) / dag bijgewerkt",
"fr": "Publicités bloquées (%) / jour mises à jour",
"it": "Pubblicità bloccate (%) / giorno aggiornate",
"sv": "Blockerade annonser (%) / dag uppdaterad",
"no": "Blokkerte annonser (%) / dag oppdatert",
"es": "Anuncios bloqueados (%) / día actualizado",
"da": "Blokerede annoncer (%) / dag opdateret",
"ru": "Заблокированные объявления (%) / день обновлены",
"pl": "Zablokowane reklamy (%) / dzień zaktualizowany"
},
"tokens": [
{
Expand Down

0 comments on commit f273d47

Please sign in to comment.