diff --git a/core/class/weather.class.php b/core/class/weather.class.php index 01e24ec..9749aea 100644 --- a/core/class/weather.class.php +++ b/core/class/weather.class.php @@ -746,6 +746,19 @@ public function postUpdate() { $weatherCmd->setDisplay('generic_type', 'WEATHER_TEMPERATURE_MAX_' . $i); $weatherCmd->save(); + $weatherCmd = $this->getCmd(null, 'condition_' . $i); + if (!is_object($weatherCmd)) { + $weatherCmd = new weatherCmd(); + } + $weatherCmd->setName(__('Condition', __FILE__) . ' +' . $i); + $weatherCmd->setLogicalId('condition_' . $i); + $weatherCmd->setEqLogic_id($this->getId()); + $weatherCmd->setUnite(''); + $weatherCmd->setType('info'); + $weatherCmd->setSubType('string'); + $weatherCmd->setDisplay('generic_type', 'WEATHER_CONDITION_' . $i); + $weatherCmd->save(); + $weatherCmd = $this->getCmd(null, 'condition_id_' . $i); if (!is_object($weatherCmd)) { $weatherCmd = new weatherCmd(); @@ -1034,10 +1047,10 @@ public function updateWeatherData() { $url .= '&lang=' . substr(config::byKey('language'), 0, 2); $request_http = new com_http($url); $request_http->setHeader(array('Autorization: ' . sha512(mb_strtolower(config::byKey('market::username')) . ':' . config::byKey('market::password')))); - $datas = json_decode($request_http->exec(60,6), true); + $datas = json_decode($request_http->exec(), true); if ($datas['state'] != 'ok') { sleep(15); - $datas = json_decode($request_http->exec(60,6), true); + $datas = json_decode($request_http->exec(), true); } if ($datas['state'] != 'ok') { return; diff --git a/docs/de_DE/changelog.md b/docs/de_DE/changelog.md index 5833f1e..ad08637 100644 --- a/docs/de_DE/changelog.md +++ b/docs/de_DE/changelog.md @@ -4,6 +4,10 @@ > >Wenn es keine Informationen über die Aktualisierung gibt, bedeutet dies, dass es sich nur um die Aktualisierung von Dokumentation, Übersetzung oder Text handelt. +# 31.10.2024 + +- Optimierung der Wetterabfrage + # 26.09.2024 - Eine Warnung wurde behoben diff --git a/docs/en_US/changelog.md b/docs/en_US/changelog.md index eabe319..593f878 100644 --- a/docs/en_US/changelog.md +++ b/docs/en_US/changelog.md @@ -4,6 +4,10 @@ > >If there is no information on the update, it means that it concerns only the update of documentation, translation or text. +# 10/31/2024 + +- Optimizing weather retrieval + # 09/26/2024 - Fixed a warning diff --git a/docs/es_ES/changelog.md b/docs/es_ES/changelog.md index 41736e5..b8ae9a2 100644 --- a/docs/es_ES/changelog.md +++ b/docs/es_ES/changelog.md @@ -4,6 +4,10 @@ > >Si no hay información sobre la actualización, significa que se trata solo de la actualización de la documentación, la traducción o el texto. +# 31/10/2024 + +- Optimización de la recuperación del tiempo + # 26/09/2024 - Se corrigió una advertencia diff --git a/docs/fr_FR/changelog.md b/docs/fr_FR/changelog.md index 43ce31c..4635b3c 100644 --- a/docs/fr_FR/changelog.md +++ b/docs/fr_FR/changelog.md @@ -4,6 +4,10 @@ > >S'il n'y a pas d'information sur la mise à jour, c'est que celle-ci concerne uniquement de la mise à jour de documentation, de traduction ou de texte. +# 31/12/2025 + +- Reduction du nombre de requete pour reduire la charge sur les services cloud + # 31/10/2024 - Optimisation de la récupération de la météo diff --git a/docs/i18n/de_DE.json b/docs/i18n/de_DE.json index 1f0dd32..d574d2c 100644 --- a/docs/i18n/de_DE.json +++ b/docs/i18n/de_DE.json @@ -2,6 +2,8 @@ "changelog.md": { "Changelog Weather": "Changelog Wetter", "S'il n'y a pas d'information sur la mise à jour, c'est que celle-ci concerne uniquement de la mise à jour de documentation, de traduction ou de texte": "Wenn es keine Informationen über die Aktualisierung gibt, bedeutet dies, dass es sich nur um die Aktualisierung von Dokumentation, Übersetzung oder Text handelt", + "31\/10\/2024": "31.10.2024", + "Optimisation de la récupération de la météo": "Optimierung der Wetterabfrage", "26\/09\/2024": "26.09.2024", "Correction d'un warning": "Eine Warnung wurde behoben", "26\/08\/2024": "26.08.2024", diff --git a/docs/i18n/en_US.json b/docs/i18n/en_US.json index b270b26..7820ff2 100644 --- a/docs/i18n/en_US.json +++ b/docs/i18n/en_US.json @@ -2,6 +2,8 @@ "changelog.md": { "Changelog Weather": "Changelog Weather", "S'il n'y a pas d'information sur la mise à jour, c'est que celle-ci concerne uniquement de la mise à jour de documentation, de traduction ou de texte": "If there is no information on the update, it means that it concerns only the update of documentation, translation or text", + "31\/10\/2024": "10\/31\/2024", + "Optimisation de la récupération de la météo": "Optimizing weather retrieval", "26\/09\/2024": "09\/26\/2024", "Correction d'un warning": "Fixed a warning", "26\/08\/2024": "08\/26\/2024", diff --git a/docs/i18n/es_ES.json b/docs/i18n/es_ES.json index 057684e..4927438 100644 --- a/docs/i18n/es_ES.json +++ b/docs/i18n/es_ES.json @@ -2,6 +2,8 @@ "changelog.md": { "Changelog Weather": "Changelog Weather", "S'il n'y a pas d'information sur la mise à jour, c'est que celle-ci concerne uniquement de la mise à jour de documentation, de traduction ou de texte": "Si no hay información sobre la actualización, significa que se trata solo de la actualización de la documentación, la traducción o el texto", + "31\/10\/2024": "31\/10\/2024", + "Optimisation de la récupération de la météo": "Optimización de la recuperación del tiempo", "26\/09\/2024": "26\/09\/2024", "Correction d'un warning": "Se corrigió una advertencia", "26\/08\/2024": "26\/08\/2024", diff --git a/docs/i18n/fr_FR.json b/docs/i18n/fr_FR.json index bc4dcf0..8ab97ca 100644 --- a/docs/i18n/fr_FR.json +++ b/docs/i18n/fr_FR.json @@ -3,6 +3,8 @@ "Changelog Weather": "Changelog Weather", "IMPORTANT": "IMPORTANT", "S'il n'y a pas d'information sur la mise à jour, c'est que celle-ci concerne uniquement de la mise à jour de documentation, de traduction ou de texte": "S'il n'y a pas d'information sur la mise à jour, c'est que celle-ci concerne uniquement de la mise à jour de documentation, de traduction ou de texte", + "31\/10\/2024": "31\/10\/2024", + "Optimisation de la récupération de la météo": "Optimisation de la récupération de la météo", "26\/09\/2024": "26\/09\/2024", "Correction d'un warning": "Correction d'un warning", "26\/08\/2024": "26\/08\/2024", diff --git a/docs/i18n/pt_PT.json b/docs/i18n/pt_PT.json index d981952..9b6afa6 100644 --- a/docs/i18n/pt_PT.json +++ b/docs/i18n/pt_PT.json @@ -2,6 +2,8 @@ "changelog.md": { "Changelog Weather": "Changelog Tempo", "S'il n'y a pas d'information sur la mise à jour, c'est que celle-ci concerne uniquement de la mise à jour de documentation, de traduction ou de texte": "Se não houver informação sobre a atualização, significa que se trata apenas da atualização da documentação, tradução ou texto", + "31\/10\/2024": "31\/10\/2024", + "Optimisation de la récupération de la météo": "Otimização da recuperação meteorológica", "26\/09\/2024": "26\/09\/2024", "Correction d'un warning": "Corrigido um aviso", "26\/08\/2024": "26\/08\/2024", diff --git a/docs/pt_PT/changelog.md b/docs/pt_PT/changelog.md index d92b010..995903b 100644 --- a/docs/pt_PT/changelog.md +++ b/docs/pt_PT/changelog.md @@ -4,6 +4,10 @@ > >Se não houver informação sobre a atualização, significa que se trata apenas da atualização da documentação, tradução ou texto. +# 31/10/2024 + +- Otimização da recuperação meteorológica + # 26/09/2024 - Corrigido um aviso