New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

iobroker.accuweather

Package Overview
Dependencies
Maintainers
29
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iobroker.accuweather - npm Package Compare versions

Comparing version 1.2.4 to 1.3.0

admin/admin.d.ts

371

io-package.json
{
"common": {
"name": "accuweather",
"version": "1.2.4",
"news": {
"1.2.4": {
"en": "dependencies update",
"de": "Abhängigkeiten aktualisieren",
"ru": "обновление зависимостей",
"pt": "atualização de dependências",
"nl": "afhankelijkheden bijwerken",
"fr": "mise à jour des dépendances",
"it": "aggiornamento delle dipendenze",
"es": "actualización de dependencias",
"pl": "aktualizacja zależności",
"zh-cn": "依赖更新"
},
"1.2.3": {
"en": "HoursOfSun parameter added to Daily forecast",
"de": "HoursOfSun-Parameter zur täglichen Vorhersage hinzugefügt",
"ru": "В суточный прогноз добавлен параметр HoursOfSun",
"pt": "Parâmetro HoursOfSun adicionado à previsão diária",
"nl": "HoursOfSun-parameter toegevoegd aan dagelijkse voorspelling",
"fr": "Paramètre HoursOfSun ajouté aux prévisions quotidiennes",
"it": "Parametro HoursOfSun aggiunto alla previsione giornaliera",
"es": "Parámetro HoursOfSun agregado al pronóstico diario",
"pl": "Dodano parametr HoursOfSun do prognozy dziennej",
"zh-cn": "每日预测中添加了 hoursOfSun 参数"
},
"1.2.1": {
"en": "Updated logo",
"de": "Aktualisiertes Logo",
"ru": "Обновленный логотип",
"pt": "Logotipo atualizado",
"nl": "Bijgewerkt logo",
"fr": "Logo mis à jour",
"it": "Logo aggiornato",
"es": "Logotipo actualizado",
"pl": "Zaktualizowane logo",
"zh-cn": "更新标志"
},
"1.2.0": {
"en": "adjust roles to properly detect weather forecast in Summary folder. (Summary objects need to be deleted and adapter restarted after that)",
"de": "Passen Sie die Rollen an, um die Wettervorhersage im Ordner \"Zusammenfassung\" richtig zu erkennen. (Zusammenfassungsobjekte müssen danach gelöscht und der Adapter neu gestartet werden)",
"ru": "Изменены роли для правильного определения устройства Погода. (Объекты Summary необходимо удалить и после этого перезапустить адаптер)",
"pt": "ajuste as funções para detectar adequadamente a previsão do tempo na pasta Resumo. (Objetos de resumo precisam ser excluídos e o adaptador reiniciado depois disso)",
"nl": "pas rollen aan om de weersvoorspelling correct te detecteren in de map Samenvatting. (Samenvattingsobjecten moeten daarna worden verwijderd en de adapter moet opnieuw worden opgestart)",
"fr": "ajustez les rôles pour détecter correctement les prévisions météorologiques dans le dossier Résumé. (Les objets de résumé doivent être supprimés et l'adaptateur redémarré après cela)",
"it": "regolare i ruoli per rilevare correttamente le previsioni del tempo nella cartella Riepilogo. (Gli oggetti di riepilogo devono essere eliminati e l'adattatore riavviato successivamente)",
"es": "ajuste los roles para detectar correctamente el pronóstico del tiempo en la carpeta Resumen. (Los objetos de resumen deben eliminarse y el adaptador debe reiniciarse después de eso)",
"pl": "dostosuj role, aby poprawnie wykryć prognozę pogody w folderze Podsumowanie. (Obiekty podsumowania należy usunąć, a następnie ponownie uruchomić adapter)",
"zh-cn": "调整角色以正确检测摘要文件夹中的天气预报。 (之后需要删除摘要对象并重新启动适配器)"
},
"1.1.7": {
"en": "* Create device for device-detector \n\n## v1.1.6 (2021-05-05)\nMinor bug fixes to `Object.common` section",
"de": "* Gerät für Gerätedetektor erstellen\n\n## v1.1.6 (2021-05-05)\nKleinere Fehlerbehebungen im Abschnitt \"Object.common\"`",
"ru": "* Создать устройство для устройства-детектора\n\n## v1.1.6 (05.05.2021)\nНезначительные исправления ошибок в разделе `Object.common`",
"pt": "* Criar dispositivo para detector de dispositivo\n\n## v1.1.6 (2021-05-05)\nPequenas correções de bugs na seção `Object.common`",
"nl": "* Maak een apparaat voor apparaatdetector\n\n## v1.1.6 (2021-05-05)\nKleine bugfixes in de sectie 'Object.common'",
"fr": "* Créer un appareil pour le détecteur d'appareil\n\n## v1.1.6 (2021-05-05)\nCorrections de bugs mineurs dans la section `Object.common`",
"it": "* Crea dispositivo per rilevatore di dispositivi\n\n## v1.1.6 (2021-05-05)\nCorrezioni di bug minori nella sezione \"Object.common\"",
"es": "* Crear dispositivo para detector de dispositivos\n\n## v1.1.6 (05/05/2021)\nCorrecciones de errores menores en la sección `Object.common`",
"pl": "* Utwórz urządzenie dla detektora urządzeń\n\n## v1.1.6 (2021-05-05)\nDrobne poprawki błędów w sekcji `Object.common`",
"zh-cn": "* 为设备检测器创建设备\n\n## v1.1.6 (2021-05-05)\n“Object.common”部分的小错误修复"
},
"1.1.6": {
"en": "Minor bug fixes in Objects.common section",
"de": "Kleinere Fehlerbehebungen im Abschnitt Objects.common",
"ru": "Незначительные исправления ошибок в разделе Objects.common",
"pt": "Pequenas correções de bugs na seção Objects.common",
"nl": "Kleine bugfixes in de sectie Objects.common",
"fr": "Corrections de bogues mineurs dans la section Objects.common",
"it": "Correzioni di bug minori nella sezione Objects.common",
"es": "Correcciones de errores menores en la sección Objects.common",
"pl": "Drobne poprawki błędów w sekcji Objects.common",
"zh-cn": "Objects.common部分中的小错误修复"
},
"1.1.5": {
"en": "Disable strict object check. Resolve warning with js-controller 3.2",
"de": "Deaktivieren Sie die strikte Objektprüfung. Warnung mit js-controller beheben 3.2",
"ru": "Отключена строгая проверка объекта. Устранение warning на js-controller 3.2",
"pt": "Desative a verificação estrita de objeto. Resolva o aviso com js-controller 3.2",
"nl": "Schakel strikte objectcontrole uit. Los de waarschuwing op met js-controller 3.2",
"fr": "Désactivez la vérification d'objet stricte. Résoudre l'avertissement avec js-controller 3.2",
"it": "Disabilita il controllo degli oggetti rigoroso. Risolvere gli avvisi con js-controller 3.2",
"es": "Desactive la comprobación estricta de objetos. Resolver advertencia con js-controller 3.2",
"pl": "Wyłącz ścisłe sprawdzanie obiektów. Rozwiązanie ostrzeżenia za pomocą kontrolera js 3.2",
"zh-cn": "禁用严格对象检查。使用js-controller 3.2解决警告"
},
"1.1.4": {
"en": "Small bug-fixes to check intervals",
"de": "Kleine Fehlerbehebungen zur Überprüfung der Intervalle",
"ru": "Небольшие исправления ошибок для проверки интервалов",
"pt": "Pequenas correções de erros para verificar intervalos",
"nl": "Kleine bugfixes om intervallen te controleren",
"fr": "Petites corrections de bugs pour vérifier les intervalles",
"it": "Piccole correzioni di bug per controllare gli intervalli",
"es": "Pequeñas correcciones de errores para verificar intervalos",
"pl": "Małe poprawki błędów sprawdzające interwały",
"zh-cn": "小错误修复,以检查间隔"
},
"1.1.3": {
"en": "Minor updates for compact mode",
"de": "Kleinere Updates für den Kompaktmodus",
"ru": "Незначительные обновления для компактного режима",
"pt": "Pequenas atualizações para o modo compacto",
"nl": "Kleine updates voor compacte modus",
"fr": "Mises à jour mineures pour le mode compact",
"it": "Piccoli aggiornamenti per la modalità compatta",
"es": "Actualizaciones menores para el modo compacto",
"pl": "Niewielkie aktualizacje trybu kompaktowego",
"zh-cn": "压缩模式的次要更新"
},
"1.1.1": {
"en": "Summary channel added to support automatic weather device detection by type-detector",
"de": "Zusammenfassungskanal hinzugefügt, um die automatische Erkennung von Wettergeräten durch den Typdetektor zu unterstützen",
"ru": "Добавлен Summary Channel для поддержки автоматического определения погодных устройств с помощью type-detector",
"pt": "Canal de resumo adicionado para oferecer suporte à detecção automática de dispositivos climáticos por detector de tipo",
"nl": "Overzichtskanaal toegevoegd om automatische weerapparaatdetectie door typedetector te ondersteunen",
"fr": "Chaîne récapitulative ajoutée pour permettre la détection automatique du dispositif météorologique par type",
"it": "Aggiunto il canale di riepilogo per supportare il rilevamento automatico dei dispositivi meteorologici mediante rilevatore di tipo",
"es": "Resumen del canal agregado para admitir la detección automática de dispositivos meteorológicos por detector de tipo",
"pl": "Dodano kanał podsumowania w celu obsługi automatycznego wykrywania urządzenia pogodowego według detektora typu",
"zh-cn": "添加了摘要通道以支持类型检测器自动检测天气设备"
},
"1.0.2": {
"en": "Production release",
"de": "Produktionsfreigabe",
"ru": "Первая Версия",
"pt": "Lançamento de produção",
"nl": "Productie release",
"fr": "Production",
"it": "Rilascio di produzione",
"es": "Lanzamiento de la producción",
"pl": "Dopuszczenie do produkcji",
"zh-cn": "生产发布"
},
"0.1.0": {
"en": "initial release",
"de": "Erstveröffentlichung",
"ru": "Начальная версия",
"pt": "lançamento inicial",
"nl": "Eerste uitgave",
"fr": "Première version",
"it": "Versione iniziale",
"es": "Versión inicial",
"pl": "Pierwsze wydanie",
"zh-cn": "首次出版"
},
"0.0.1": {
"en": "initial release",
"de": "Erstveröffentlichung",
"ru": "Начальная версия",
"pt": "lançamento inicial",
"nl": "Eerste uitgave",
"fr": "Première version",
"it": "Versione iniziale",
"es": "Versión inicial",
"pl": "Pierwsze wydanie",
"zh-cn": "首次出版"
}
},
"title": "AccuWeather",
"titleLang": {
"en": "AccuWeather",
"de": "AccuWeather",
"ru": "AccuWeather",
"pt": "AccuWeather",
"nl": "AccuWeather",
"fr": "AccuWeather",
"it": "AccuWeather",
"es": "AccuWeather",
"pl": "AccuWeather",
"zh-cn": "机构AccuWeather"
},
"desc": {
"en": "Weather forecast using AccuWeather API",
"de": "Wettervorhersage mit AccuWeather API",
"ru": "Прогноз погоды с использованием AccuWeather API",
"pt": "Previsão do tempo usando a API AccuWeather",
"nl": "Weersverwachting met AccuWeather API",
"fr": "Prévisions météorologiques à l'aide de l'API AccuWeather",
"it": "Previsioni del tempo utilizzando l'API AccuWeather",
"es": "Pronóstico del tiempo usando AccuWeather API",
"pl": "Prognoza pogody za pomocą interfejsu API AccuWeather",
"zh-cn": "使用AccuWeather API的天气预报"
},
"authors": [
"algar42 <igor.aleschenkov@gmail.com>"
],
"keywords": [
"Weather",
"AccuWeather",
"Forecast"
],
"license": "MIT",
"platform": "Javascript/Node.js",
"icon": "accuweather.png",
"enabled": true,
"extIcon": "https://raw.githubusercontent.com/iobroker-community-adapters/ioBroker.accuweather/master/admin/accuweather.png",
"readme": "https://github.com/iobroker-community-adapters/ioBroker.accuweather/blob/master/README.md",
"loglevel": "info",
"mode": "daemon",
"type": "weather",
"compact": true,
"materialize": true,
"adminUI": {
"config": "materialize"
},
"connectionType": "cloud",
"dataSource": "poll",
"dependencies": [
{
"js-controller": ">=2.0.0"
}
]
"common": {
"name": "accuweather",
"version": "1.3.0",
"news": {
"1.3.0": {
"en": "added the Wind Direction Text und Cloud Cover\nAdded json config",
"de": "windrichtung Text und Cloud Cover\nHinzugefügt json config",
"ru": "добавлено направление ветра Текст und Облачная крышка\nДобавлено json config",
"pt": "adicionou o texto de direção do vento und Cloud Cover\nAdicionado json config",
"nl": "voegde de Wind Direction Text und Cloud Cover toe\n_",
"fr": "ajouté la fenêtre de direction du vent Text und Cloud Cover\nAjouté json config",
"it": "aggiunto la direzione del vento Testo und Cloud Cover\nAggiunto json config",
"es": "añadido el texto dirección del viento und cubierta de nube\nAñadido json config",
"pl": "wprowadzono dyrekcję Wind Direction Text i Cloud Cover\nAdded json configig",
"uk": "додана хмарна кришка вітру\nДодано json config",
"zh-cn": "添加了Wind Direction案文 und Cloud Cover\n增编"
},
"1.2.4": {
"en": "dependencies update",
"de": "Abhängigkeiten aktualisieren",
"ru": "обновление зависимостей",
"pt": "atualização de dependências",
"nl": "afhankelijkheden bijwerken",
"fr": "mise à jour des dépendances",
"it": "aggiornamento delle dipendenze",
"es": "actualización de dependencias",
"pl": "aktualizacja zależności",
"zh-cn": "依赖更新"
},
"1.2.3": {
"en": "HoursOfSun parameter added to Daily forecast",
"de": "HoursOfSun-Parameter zur täglichen Vorhersage hinzugefügt",
"ru": "В суточный прогноз добавлен параметр HoursOfSun",
"pt": "Parâmetro HoursOfSun adicionado à previsão diária",
"nl": "HoursOfSun-parameter toegevoegd aan dagelijkse voorspelling",
"fr": "Paramètre HoursOfSun ajouté aux prévisions quotidiennes",
"it": "Parametro HoursOfSun aggiunto alla previsione giornaliera",
"es": "Parámetro HoursOfSun agregado al pronóstico diario",
"pl": "Dodano parametr HoursOfSun do prognozy dziennej",
"zh-cn": "每日预测中添加了 hoursOfSun 参数"
},
"1.2.1": {
"en": "Updated logo",
"de": "Aktualisiertes Logo",
"ru": "Обновленный логотип",
"pt": "Logotipo atualizado",
"nl": "Bijgewerkt logo",
"fr": "Logo mis à jour",
"it": "Logo aggiornato",
"es": "Logotipo actualizado",
"pl": "Zaktualizowane logo",
"zh-cn": "更新标志"
},
"1.2.0": {
"en": "adjust roles to properly detect weather forecast in Summary folder. (Summary objects need to be deleted and adapter restarted after that)",
"de": "Passen Sie die Rollen an, um die Wettervorhersage im Ordner \"Zusammenfassung\" richtig zu erkennen. (Zusammenfassungsobjekte müssen danach gelöscht und der Adapter neu gestartet werden)",
"ru": "Изменены роли для правильного определения устройства Погода. (Объекты Summary необходимо удалить и после этого перезапустить адаптер)",
"pt": "ajuste as funções para detectar adequadamente a previsão do tempo na pasta Resumo. (Objetos de resumo precisam ser excluídos e o adaptador reiniciado depois disso)",
"nl": "pas rollen aan om de weersvoorspelling correct te detecteren in de map Samenvatting. (Samenvattingsobjecten moeten daarna worden verwijderd en de adapter moet opnieuw worden opgestart)",
"fr": "ajustez les rôles pour détecter correctement les prévisions météorologiques dans le dossier Résumé. (Les objets de résumé doivent être supprimés et l'adaptateur redémarré après cela)",
"it": "regolare i ruoli per rilevare correttamente le previsioni del tempo nella cartella Riepilogo. (Gli oggetti di riepilogo devono essere eliminati e l'adattatore riavviato successivamente)",
"es": "ajuste los roles para detectar correctamente el pronóstico del tiempo en la carpeta Resumen. (Los objetos de resumen deben eliminarse y el adaptador debe reiniciarse después de eso)",
"pl": "dostosuj role, aby poprawnie wykryć prognozę pogody w folderze Podsumowanie. (Obiekty podsumowania należy usunąć, a następnie ponownie uruchomić adapter)",
"zh-cn": "调整角色以正确检测摘要文件夹中的天气预报。 (之后需要删除摘要对象并重新启动适配器)"
},
"1.1.7": {
"en": "* Create device for device-detector \n\n## v1.1.6 (2021-05-05)\nMinor bug fixes to `Object.common` section",
"de": "* Gerät für Gerätedetektor erstellen\n\n## v1.1.6 (2021-05-05)\nKleinere Fehlerbehebungen im Abschnitt \"Object.common\"`",
"ru": "* Создать устройство для устройства-детектора\n\n## v1.1.6 (05.05.2021)\nНезначительные исправления ошибок в разделе `Object.common`",
"pt": "* Criar dispositivo para detector de dispositivo\n\n## v1.1.6 (2021-05-05)\nPequenas correções de bugs na seção `Object.common`",
"nl": "* Maak een apparaat voor apparaatdetector\n\n## v1.1.6 (2021-05-05)\nKleine bugfixes in de sectie 'Object.common'",
"fr": "* Créer un appareil pour le détecteur d'appareil\n\n## v1.1.6 (2021-05-05)\nCorrections de bugs mineurs dans la section `Object.common`",
"it": "* Crea dispositivo per rilevatore di dispositivi\n\n## v1.1.6 (2021-05-05)\nCorrezioni di bug minori nella sezione \"Object.common\"",
"es": "* Crear dispositivo para detector de dispositivos\n\n## v1.1.6 (05/05/2021)\nCorrecciones de errores menores en la sección `Object.common`",
"pl": "* Utwórz urządzenie dla detektora urządzeń\n\n## v1.1.6 (2021-05-05)\nDrobne poprawki błędów w sekcji `Object.common`",
"zh-cn": "* 为设备检测器创建设备\n\n## v1.1.6 (2021-05-05)\n“Object.common”部分的小错误修复"
},
"1.1.6": {
"en": "Minor bug fixes in Objects.common section",
"de": "Kleinere Fehlerbehebungen im Abschnitt Objects.common",
"ru": "Незначительные исправления ошибок в разделе Objects.common",
"pt": "Pequenas correções de bugs na seção Objects.common",
"nl": "Kleine bugfixes in de sectie Objects.common",
"fr": "Corrections de bogues mineurs dans la section Objects.common",
"it": "Correzioni di bug minori nella sezione Objects.common",
"es": "Correcciones de errores menores en la sección Objects.common",
"pl": "Drobne poprawki błędów w sekcji Objects.common",
"zh-cn": "Objects.common部分中的小错误修复"
}
},
"native": {
"apiKey": "",
"loKey": "",
"language": "en-us"
"title": "AccuWeather",
"titleLang": {
"en": "AccuWeather",
"de": "AccuWeather",
"ru": "AccuWeather",
"pt": "AccuWeather",
"nl": "AccuWeather",
"fr": "AccuWeather",
"it": "AccuWeather",
"es": "AccuWeather",
"pl": "AccuWeather",
"zh-cn": "机构AccuWeather"
},
"objects": [],
"instanceObjects": []
"desc": {
"en": "Weather forecast using AccuWeather API",
"de": "Wettervorhersage mit AccuWeather API",
"ru": "Прогноз погоды с использованием AccuWeather API",
"pt": "Previsão do tempo usando a API AccuWeather",
"nl": "Weersverwachting met AccuWeather API",
"fr": "Prévisions météorologiques à l'aide de l'API AccuWeather",
"it": "Previsioni del tempo utilizzando l'API AccuWeather",
"es": "Pronóstico del tiempo usando AccuWeather API",
"pl": "Prognoza pogody za pomocą interfejsu API AccuWeather",
"zh-cn": "使用AccuWeather API的天气预报"
},
"authors": [
"algar42 <igor.aleschenkov@gmail.com>"
],
"keywords": [
"Weather",
"AccuWeather",
"Forecast"
],
"license": "MIT",
"platform": "Javascript/Node.js",
"icon": "accuweather.png",
"enabled": true,
"extIcon": "https://raw.githubusercontent.com/iobroker-community-adapters/ioBroker.accuweather/master/admin/accuweather.png",
"readme": "https://github.com/iobroker-community-adapters/ioBroker.accuweather/blob/master/README.md",
"loglevel": "info",
"mode": "daemon",
"type": "weather",
"compact": true,
"materialize": true,
"adminUI": {
"config": "json"
},
"connectionType": "cloud",
"dataSource": "poll",
"dependencies": [
{
"js-controller": ">=2.0.0"
}
]
},
"native": {
"apiKey": "",
"loKey": "",
"language": ""
},
"objects": [],
"instanceObjects": []
}
"use strict";
const req = require("request");
const axios = require("axios");
//const moment = require("moment");
const queryString = require("query-string");
const queryString = require("qs");

@@ -64,32 +64,20 @@ class Accuapi {

get() {
return new Promise((resolve, reject) => {
//
//const body = require("./test-data/daily.json");
//
this.generateReqUrl();
req({ url: this.url, json: true }, (err, res, body) => {
err ? reject(`Forecast cannot be retrieved. ERROR: ${err}`) : null;
res.statusCode !== 200 ? reject(`Forecast cannot be retrieved. Response: ${res.statusCode} ${res.statusMessage}`) : null;
resolve(body);
//log.info("response: " + body);
this.generateReqUrl();
return axios(this.url)
.then(response => response.data)
.catch(error => {
throw new Error(`Forecast cannot be retrieved. ERROR: ${error.response && error.response.data || error.toString()}`);
});
}
});
}
getCurrent() {
return new Promise((resolve, reject) => {
//
//const body = require("./test-data/currentCond.json");
//
this.generateReqUrl(true);
req({ url: this.url, json: true }, (err, res, body) => {
err ? reject(`Forecast cannot be retrieved. ERROR: ${err}`) : null;
res.statusCode !== 200 ? reject(`Forecast cannot be retrieved. Response: ${res.statusCode} ${res.statusMessage}`) : null;
resolve(body);
//log.info("response: " + body);
//
//const body = require("./test-data/currentCond.json");
//
this.generateReqUrl(true);
return axios(this.url)
.then(response => response.data)
.catch(error => {
throw new Error(`Forecast cannot be retrieved. ERROR: ${error.response && error.response.data || error.toString()}`);
});
});
}

@@ -96,0 +84,0 @@ }

{
"nextHour.LocalObservationDateTime": {
"type": "state",
"common": {
"name": "Forecast date",
"type": "string",
"read": true,
"write": false,
"role": "date"
},
"native": {}
"nextHour.LocalObservationDateTime": {
"type": "state",
"common": {
"name": "Forecast date",
"type": "string",
"read": true,
"write": false,
"role": "date"
},
"nextHour.WeatherIcon": {
"type": "state",
"common": {
"name": "Weather Icon",
"type": "number",
"read": true,
"write": false,
"role": "value"
},
"native": {}
"native": {}
},
"nextHour.WeatherIcon": {
"type": "state",
"common": {
"name": "Weather Icon",
"type": "number",
"read": true,
"write": false,
"role": "value"
},
"nextHour.WeatherIconURL": {
"type": "state",
"common": {
"name": "Weather Icon URL",
"type": "string",
"read": true,
"write": false,
"role": "media.url"
},
"native": {}
"native": {}
},
"nextHour.WeatherIconURL": {
"type": "state",
"common": {
"name": "Weather Icon URL",
"type": "string",
"read": true,
"write": false,
"role": "media.url"
},
"nextHour.WeatherIconURLS": {
"type": "state",
"common": {
"name": "SVG Weather Icon URL",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon"
},
"native": {}
"native": {}
},
"nextHour.WeatherIconURLS": {
"type": "state",
"common": {
"name": "SVG Weather Icon URL",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon"
},
"nextHour.WeatherText": {
"type": "state",
"common": {
"name": "Weather Description",
"type": "string",
"read": true,
"write": false,
"role": "weather.state"
},
"native": {}
"native": {}
},
"nextHour.WeatherText": {
"type": "state",
"common": {
"name": "Weather Description",
"type": "string",
"read": true,
"write": false,
"role": "weather.state"
},
"nextHour.HasPrecipitation": {
"type": "state",
"common": {
"name": "Precipitation",
"type": "boolean",
"read": true,
"write": false,
"role": "value"
},
"native": {}
"native": {}
},
"nextHour.HasPrecipitation": {
"type": "state",
"common": {
"name": "Precipitation",
"type": "boolean",
"read": true,
"write": false,
"role": "value"
},
"nextHour.PrecipitationType": {
"type": "state",
"common": {
"name": "Precipitation Description",
"type": "boolean",
"read": true,
"write": false,
"role": "value"
},
"native": {}
"native": {}
},
"nextHour.PrecipitationType": {
"type": "state",
"common": {
"name": "Precipitation Description",
"type": "string",
"read": true,
"write": false,
"role": "value"
},
"nextHour.Temperature": {
"type": "state",
"common": {
"name": "Temperature",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature",
"unit": "°C"
},
"native": {}
"native": {}
},
"nextHour.Temperature": {
"type": "state",
"common": {
"name": "Temperature",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature",
"unit": "°C"
},
"nextHour.RealFeelTemperature": {
"type": "state",
"common": {
"name": "Feels Like Temperature",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.feelslike",
"unit": "°C"
},
"native": {}
"native": {}
},
"nextHour.RealFeelTemperature": {
"type": "state",
"common": {
"name": "Feels Like Temperature",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.feelslike",
"unit": "°C"
},
"nextHour.RealFeelTemperatureShade": {
"type": "state",
"common": {
"name": "Shadow Temperature",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature",
"unit": "°C"
},
"native": {}
"native": {}
},
"nextHour.RealFeelTemperatureShade": {
"type": "state",
"common": {
"name": "Shadow Temperature",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature",
"unit": "°C"
},
"nextHour.DewPoint": {
"type": "state",
"common": {
"name": "Dew Point",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit": "°C"
},
"native": {}
"native": {}
},
"nextHour.DewPoint": {
"type": "state",
"common": {
"name": "Dew Point",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit": "°C"
},
"nextHour.WindSpeed":{
"type": "state",
"common": {
"name": "Wind Speed",
"type": "number",
"read": true,
"write": false,
"role": "value.speed.wind",
"unit": "km/h"
},
"native": {}
"native": {}
},
"nextHour.WindSpeed": {
"type": "state",
"common": {
"name": "Wind Speed",
"type": "number",
"read": true,
"write": false,
"role": "value.speed.wind",
"unit": "km/h"
},
"nextHour.WindDirection": {
"type": "state",
"common": {
"name": "Wind Direction",
"type": "string",
"read": true,
"write": false,
"role": "value.direction.wind",
"unit": "°"
},
"native": {}
"native": {}
},
"nextHour.WindDirection": {
"type": "state",
"common": {
"name": "Wind Direction",
"type": "number",
"read": true,
"write": false,
"role": "value.direction.wind",
"unit": "°"
},
"nextHour.WindGust": {
"type": "state",
"common": {
"name": "Wind Gust",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit": "km/h"
},
"native": {}
"native": {}
},
"nextHour.WindDirectionText": {
"type": "state",
"common": {
"name": "Wind Direction Text",
"type": "string",
"read": true,
"write": false,
"role": "value.direction.wind"
},
"nextHour.RelativeHumidity": {
"type": "state",
"common": {
"name": "Humidity",
"type": "number",
"read": true,
"write": false,
"role": "value.humidity",
"unit": "%"
},
"native": {}
"native": {}
},
"nextHour.WindGust": {
"type": "state",
"common": {
"name": "Wind Gust",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit": "km/h"
},
"nextHour.UVIndex": {
"type": "state",
"common": {
"name": "UV Index",
"type": "number",
"read": true,
"write": false,
"role": "value"
},
"native": {}
"native": {}
},
"nextHour.RelativeHumidity": {
"type": "state",
"common": {
"name": "Humidity",
"type": "number",
"read": true,
"write": false,
"role": "value.humidity",
"unit": "%"
},
"nextHour.UVIndexText": {
"type": "state",
"common": {
"name": "UV Index Description",
"type": "string",
"read": true,
"write": false,
"role": "value"
},
"native": {}
"native": {}
},
"nextHour.CloudCover": {
"type": "state",
"common": {
"name": "Cloud Cover",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit": "%"
},
"nextHour.Pressure": {
"type": "state",
"common": {
"name": "Pressure",
"type": "number",
"read": true,
"write": false,
"role": "value.pressure",
"unit":"mb"
},
"native": {}
"native": {}
},
"nextHour.UVIndex": {
"type": "state",
"common": {
"name": "UV Index",
"type": "number",
"read": true,
"write": false,
"role": "value"
},
"nextHour.PressureTendency": {
"type": "state",
"common": {
"name": "Pressure Tendency",
"type": "string",
"read": true,
"write": false,
"role": "value"
},
"native": {}
}
"native": {}
},
"nextHour.UVIndexText": {
"type": "state",
"common": {
"name": "UV Index Description",
"type": "string",
"read": true,
"write": false,
"role": "value"
},
"native": {}
},
"nextHour.Pressure": {
"type": "state",
"common": {
"name": "Pressure",
"type": "number",
"read": true,
"write": false,
"role": "value.pressure",
"unit": "mb"
},
"native": {}
},
"nextHour.PressureTendency": {
"type": "state",
"common": {
"name": "Pressure Tendency",
"type": "string",
"read": true,
"write": false,
"role": "value"
},
"native": {}
}
}
{
"Daily.dayn.Date": {
"type": "state",
"common": {
"name": "Forecast date",
"type": "string",
"read": true,
"write": false,
"role": "date"
},
"native": {}
"Daily.dayn.Date": {
"type": "state",
"common": {
"name": "Forecast date",
"type": "string",
"read": true,
"write": false,
"role": "date"
},
"Daily.dayn.Sunrise": {
"type": "state",
"common": {
"name": "Sunrise datetime",
"type": "string",
"read": true,
"write": false,
"role": "date.sunrise"
},
"native": {}
"native": {}
},
"Daily.dayn.Sunrise": {
"type": "state",
"common": {
"name": "Sunrise datetime",
"type": "string",
"read": true,
"write": false,
"role": "date.sunrise"
},
"Daily.dayn.Sunset": {
"type": "state",
"common": {
"name": "Sunset datetime",
"type": "string",
"read": true,
"write": false,
"role": "date.sunset"
},
"native": {}
"native": {}
},
"Daily.dayn.Sunset": {
"type": "state",
"common": {
"name": "Sunset datetime",
"type": "string",
"read": true,
"write": false,
"role": "date.sunset"
},
"Daily.dayn.HoursOfSun": {
"type": "state",
"common": {
"name": "Hours of Sun",
"type": "number",
"read": true,
"write": false,
"role": "value"
},
"native": {}
"native": {}
},
"Daily.dayn.HoursOfSun": {
"type": "state",
"common": {
"name": "Hours of Sun",
"type": "number",
"read": true,
"write": false,
"role": "value"
},
"Daily.dayn.Temperature.Minimum": {
"type": "state",
"common": {
"name": "Temperature Min",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.min",
"unit": "°C"
},
"native": {}
"native": {}
},
"Daily.dayn.Temperature.Minimum": {
"type": "state",
"common": {
"name": "Temperature Min",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.min",
"unit": "°C"
},
"Daily.dayn.Temperature.Maximum": {
"type": "state",
"common": {
"name": "Temperature Max",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.max",
"unit": "°C"
},
"native": {}
"native": {}
},
"Daily.dayn.Temperature.Maximum": {
"type": "state",
"common": {
"name": "Temperature Max",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.max",
"unit": "°C"
},
"Daily.dayn.RealFeelTemperature.Minimum": {
"type": "state",
"common": {
"name": "Feels Like Temperature Min",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.feelslike.min",
"unit": "°C"
},
"native": {}
"native": {}
},
"Daily.dayn.RealFeelTemperature.Minimum": {
"type": "state",
"common": {
"name": "Feels Like Temperature Min",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.feelslike.min",
"unit": "°C"
},
"Daily.dayn.RealFeelTemperature.Maximum": {
"type": "state",
"common": {
"name": "Feels Like Temperature Max",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.feelslike.max",
"unit": "°C"
},
"native": {}
"native": {}
},
"Daily.dayn.RealFeelTemperature.Maximum": {
"type": "state",
"common": {
"name": "Feels Like Temperature Max",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.feelslike.max",
"unit": "°C"
},
"Daily.dayn.dayPart.Icon": {
"type": "state",
"common": {
"name": "Weather Icon",
"type": "number",
"read": true,
"write": false,
"role": "value"
},
"native": {}
"native": {}
},
"Daily.dayn.dayPart.Icon": {
"type": "state",
"common": {
"name": "Weather Icon",
"type": "number",
"read": true,
"write": false,
"role": "value"
},
"Daily.dayn.dayPart.IconURL": {
"type": "state",
"common": {
"name": "Weather Icon URL",
"type": "string",
"read": true,
"write": false,
"role": "media.url"
},
"native": {}
"native": {}
},
"Daily.dayn.dayPart.IconURL": {
"type": "state",
"common": {
"name": "Weather Icon URL",
"type": "string",
"read": true,
"write": false,
"role": "media.url"
},
"Daily.dayn.dayPart.IconURLS": {
"type": "state",
"common": {
"name": "SVG Weather Icon URL",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon"
},
"native": {}
"native": {}
},
"Daily.dayn.dayPart.IconURLS": {
"type": "state",
"common": {
"name": "SVG Weather Icon URL",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon"
},
"Daily.dayn.dayPart.IconPhrase": {
"type": "state",
"common": {
"name": "Weather Description",
"type": "string",
"read": true,
"write": false,
"role": "weather.state"
},
"native": {}
"native": {}
},
"Daily.dayn.dayPart.IconPhrase": {
"type": "state",
"common": {
"name": "Weather Description",
"type": "string",
"read": true,
"write": false,
"role": "weather.state"
},
"Daily.dayn.dayPart.HasPrecipitation": {
"type": "state",
"common": {
"name": "Precipitation",
"type": "boolean",
"read": true,
"write": false,
"role": "value"
},
"native": {}
"native": {}
},
"Daily.dayn.dayPart.HasPrecipitation": {
"type": "state",
"common": {
"name": "Precipitation",
"type": "boolean",
"read": true,
"write": false,
"role": "value"
},
"Daily.dayn.dayPart.ShortPhrase": {
"type": "state",
"common": {
"name": "Weather Description",
"type": "string",
"read": true,
"write": false,
"role": "weather.state.description"
},
"native": {}
"native": {}
},
"Daily.dayn.dayPart.ShortPhrase": {
"type": "state",
"common": {
"name": "Weather Description",
"type": "string",
"read": true,
"write": false,
"role": "weather.state.description"
},
"Daily.dayn.dayPart.LongPhrase": {
"type": "state",
"common": {
"name": "Weather Description",
"type": "string",
"read": true,
"write": false,
"role": "value"
},
"native": {}
"native": {}
},
"Daily.dayn.dayPart.LongPhrase": {
"type": "state",
"common": {
"name": "Weather Description",
"type": "string",
"read": true,
"write": false,
"role": "value"
},
"Daily.dayn.dayPart.PrecipitationProbability": {
"type": "state",
"common": {
"name": "Precipitation Probability",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation",
"unit":"%"
},
"native": {}
"native": {}
},
"Daily.dayn.dayPart.PrecipitationProbability": {
"type": "state",
"common": {
"name": "Precipitation Probability",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation",
"unit": "%"
},
"Daily.dayn.dayPart.ThunderstormProbability": {
"type": "state",
"common": {
"name": "Thunderstorm Probability",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit":"%"
},
"native": {}
"native": {}
},
"Daily.dayn.dayPart.ThunderstormProbability": {
"type": "state",
"common": {
"name": "Thunderstorm Probability",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit": "%"
},
"Daily.dayn.dayPart.RainProbability": {
"type": "state",
"common": {
"name": "Rain Probability",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit":"%"
},
"native": {}
"native": {}
},
"Daily.dayn.dayPart.RainProbability": {
"type": "state",
"common": {
"name": "Rain Probability",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit": "%"
},
"Daily.dayn.dayPart.SnowProbability": {
"type": "state",
"common": {
"name": "Snow Probability",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit":"%"
},
"native": {}
"native": {}
},
"Daily.dayn.dayPart.SnowProbability": {
"type": "state",
"common": {
"name": "Snow Probability",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit": "%"
},
"Daily.dayn.dayPart.IceProbability": {
"type": "state",
"common": {
"name": "Ice Probability",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit":"%"
},
"native": {}
"native": {}
},
"Daily.dayn.dayPart.IceProbability": {
"type": "state",
"common": {
"name": "Ice Probability",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit": "%"
},
"Daily.dayn.dayPart.WindSpeed":{
"type": "state",
"common": {
"name": "Wind Speed",
"type": "number",
"read": true,
"write": false,
"role": "value.speed.wind",
"unit": "km/h"
},
"native": {}
"native": {}
},
"Daily.dayn.dayPart.WindSpeed": {
"type": "state",
"common": {
"name": "Wind Speed",
"type": "number",
"read": true,
"write": false,
"role": "value.speed.wind",
"unit": "km/h"
},
"Daily.dayn.dayPart.WindDirection": {
"type": "state",
"common": {
"name": "Wind Direction",
"type": "string",
"read": true,
"write": false,
"role": "value.direction.wind",
"unit": "°"
},
"native": {}
"native": {}
},
"Daily.dayn.dayPart.WindDirection": {
"type": "state",
"common": {
"name": "Wind Direction",
"type": "string",
"read": true,
"write": false,
"role": "value.direction.wind",
"unit": "°"
},
"Daily.dayn.dayPart.WindGust": {
"type": "state",
"common": {
"name": "Wind Gust",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit": "km/h"
},
"native": {}
"native": {}
},
"Daily.dayn.dayPart.WindGust": {
"type": "state",
"common": {
"name": "Wind Gust",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit": "km/h"
},
"Daily.dayn.dayPart.RainVolume":{
"type": "state",
"common": {
"name": "Rain Amount",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit":"mm"
},
"native": {}
"native": {}
},
"Daily.dayn.dayPart.RainVolume": {
"type": "state",
"common": {
"name": "Rain Amount",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit": "mm"
},
"Daily.dayn.dayPart.SnowVolume":{
"type": "state",
"common": {
"name": "Snow Amount",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit":"mm"
},
"native": {}
"native": {}
},
"Daily.dayn.dayPart.SnowVolume": {
"type": "state",
"common": {
"name": "Snow Amount",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit": "mm"
},
"Daily.dayn.dayPart.IceVolume":{
"type": "state",
"common": {
"name": "Ice Amount",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit":"mm"
},
"native": {}
"native": {}
},
"Daily.dayn.dayPart.IceVolume": {
"type": "state",
"common": {
"name": "Ice Amount",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit": "mm"
},
"Daily.dayn.dayPart.TotalLiquidVolume": {
"type": "state",
"common": {
"name": "Total Precipitation Amount",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation",
"unit":"mm"
},
"native": {}
}
"native": {}
},
"Daily.dayn.dayPart.TotalLiquidVolume": {
"type": "state",
"common": {
"name": "Total Precipitation Amount",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation",
"unit": "mm"
},
"native": {}
}
}
"use strict";
async function createSummaryObjects(adapter) {

@@ -9,3 +8,3 @@ const obj = require("./summaryObject.json");

common: {
name: "Weather Summary"
name: "Weather Summary",
},

@@ -19,12 +18,10 @@ native: {},

}
}
async function createNextHourForecatObjects(hour, adapter) {
const obj = require("./nextHourObject.json");
await adapter.setObjectNotExistsAsync("Hourly.h" + hour, {
await adapter.setObjectNotExistsAsync(`Hourly.h${hour}`, {
type: "channel",
common: {
name: `Hour ${hour} Forecast`
name: `Hour ${hour} Forecast`,
},

@@ -37,11 +34,12 @@ native: {},

const measure = {};
const nkey = key.replace("nextHour", "Hourly.h" + hour);
const nkey = key.replace("nextHour", `Hourly.h${hour}`);
const role = _obj[key].common.role;
measure[nkey] = Object.assign({}, _obj[key]);
measure[nkey].common = Object.assign({}, _obj[key].common);
if (measure[nkey].common.role) { measure[nkey].common.role = role + ".forecast." + hour; }
adapter.log.debug("key: " + nkey + ", role:" + JSON.stringify(measure[nkey].common.role) + ", base: " + role);
if (measure[nkey].common.role) {
measure[nkey].common.role = `${role}.forecast.${hour}`;
}
adapter.log.debug(`key: ${nkey}, role:${JSON.stringify(measure[nkey].common.role)}, base: ${role}`);
adapter.setObjectNotExists(nkey, measure[nkey]);
}
}

@@ -55,3 +53,3 @@

common: {
name: `Current Conditions`
name: "Current Conditions",
},

@@ -64,3 +62,2 @@ native: {},

}
}

@@ -72,3 +69,3 @@

for (let i = 1; i <= 5; i++) {
await adapter.setObjectNotExistsAsync("Daily.Day" + i, {
await adapter.setObjectNotExistsAsync(`Daily.Day${i}`, {
type: "channel",

@@ -87,32 +84,27 @@ common: {

if (!key.indexOf("dayPart.")) {
nkey = key.replace("dayn.", "Day" + i + ".");
nkey = key.replace("dayn.", `Day${i}.`);
measure[nkey] = Object.assign({}, _obj[key]);
measure[nkey].common = Object.assign({}, _obj[key].common);
if (measure[nkey].common.role) { measure[nkey].common.role = role + ".forecast." + (i - 1); }
if (measure[nkey].common.role) {
measure[nkey].common.role = `${role}.forecast.${i - 1}`;
}
adapter.setObjectNotExists(nkey, measure[nkey]);
}
else {
["Day", "Night"].forEach(function (dp) {
nkey = key.replace("dayn.", "Day" + i + ".").replace("dayPart.", dp + ".");
} else {
["Day", "Night"].forEach(dp => {
nkey = key.replace("dayn.", `Day${i}.`).replace("dayPart.", `${dp}.`);
measure[nkey] = Object.assign({}, _obj[key]);
measure[nkey].common = Object.assign({}, _obj[key].common);
if (measure[nkey].common.role) { measure[nkey].common.role = role + ".forecast." + (i - 1); }
if (measure[nkey].common.role) {
measure[nkey].common.role = `${role}.forecast.${i - 1}`;
}
adapter.setObjectNotExists(nkey, measure[nkey]);
});
}
}
}
}
function createHourlyForecastObjects(adapter) {
async function createHourlyForecastObjects(adapter) {
for (let hr = 0; hr < 24; hr++) {
createNextHourForecatObjects(hr, adapter);
await createNextHourForecatObjects(hr, adapter);
}

@@ -119,0 +111,0 @@ }

{
"nextHour.DateTime": {
"type": "state",
"common": {
"name": "Forecast date",
"type": "string",
"read": true,
"write": false,
"role": "date"
},
"native": {}
"nextHour.DateTime": {
"type": "state",
"common": {
"name": "Forecast date",
"type": "string",
"read": true,
"write": false,
"role": "date"
},
"nextHour.WeatherIcon": {
"type": "state",
"common": {
"name": "Weather Icon",
"type": "number",
"read": true,
"write": false,
"role": "value"
},
"native": {}
"native": {}
},
"nextHour.WeatherIcon": {
"type": "state",
"common": {
"name": "Weather Icon",
"type": "number",
"read": true,
"write": false,
"role": "value"
},
"nextHour.WeatherIconURL": {
"type": "state",
"common": {
"name": "Weather Icon URL",
"type": "string",
"read": true,
"write": false,
"role": "media.url"
},
"native": {}
"native": {}
},
"nextHour.WeatherIconURL": {
"type": "state",
"common": {
"name": "Weather Icon URL",
"type": "string",
"read": true,
"write": false,
"role": "media.url"
},
"nextHour.WeatherIconURLS": {
"type": "state",
"common": {
"name": "SVG Weather Icon URL",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon"
},
"native": {}
"native": {}
},
"nextHour.WeatherIconURLS": {
"type": "state",
"common": {
"name": "SVG Weather Icon URL",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon"
},
"nextHour.IconPhrase": {
"type": "state",
"common": {
"name": "Weather Description",
"type": "string",
"read": true,
"write": false,
"role": "weather.state"
},
"native": {}
"native": {}
},
"nextHour.IconPhrase": {
"type": "state",
"common": {
"name": "Weather Description",
"type": "string",
"read": true,
"write": false,
"role": "weather.state"
},
"nextHour.HasPrecipitation": {
"type": "state",
"common": {
"name": "Precipitation",
"type": "boolean",
"read": true,
"write": false,
"role": "value"
},
"native": {}
"native": {}
},
"nextHour.HasPrecipitation": {
"type": "state",
"common": {
"name": "Precipitation",
"type": "boolean",
"read": true,
"write": false,
"role": "value"
},
"nextHour.Temperature": {
"type": "state",
"common": {
"name": "Temperature",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature",
"unit": "°C"
},
"native": {}
"native": {}
},
"nextHour.Temperature": {
"type": "state",
"common": {
"name": "Temperature",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature",
"unit": "°C"
},
"nextHour.RealFeelTemperature": {
"type": "state",
"common": {
"name": "Feels Like Temperature",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.feelslike",
"unit": "°C"
},
"native": {}
"native": {}
},
"nextHour.RealFeelTemperature": {
"type": "state",
"common": {
"name": "Feels Like Temperature",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.feelslike",
"unit": "°C"
},
"nextHour.DewPoint": {
"type": "state",
"common": {
"name": "Dew Point",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit": "°C"
},
"native": {}
"native": {}
},
"nextHour.DewPoint": {
"type": "state",
"common": {
"name": "Dew Point",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit": "°C"
},
"nextHour.WindSpeed":{
"type": "state",
"common": {
"name": "Wind Speed",
"type": "number",
"read": true,
"write": false,
"role": "value.speed.wind",
"unit": "km/h"
},
"native": {}
"native": {}
},
"nextHour.WindSpeed": {
"type": "state",
"common": {
"name": "Wind Speed",
"type": "number",
"read": true,
"write": false,
"role": "value.speed.wind",
"unit": "km/h"
},
"nextHour.WindDirection": {
"type": "state",
"common": {
"name": "Wind Direction",
"type": "string",
"read": true,
"write": false,
"role": "value.direction.wind",
"unit": "°"
},
"native": {}
"native": {}
},
"nextHour.WindDirection": {
"type": "state",
"common": {
"name": "Wind Direction",
"type": "string",
"read": true,
"write": false,
"role": "value.direction.wind",
"unit": "°"
},
"nextHour.WindGust": {
"type": "state",
"common": {
"name": "Wind Gust",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit": "km/h"
},
"native": {}
"native": {}
},
"nextHour.WindGust": {
"type": "state",
"common": {
"name": "Wind Gust",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit": "km/h"
},
"nextHour.RelativeHumidity": {
"type": "state",
"common": {
"name": "Humidity",
"type": "number",
"read": true,
"write": false,
"role": "value.humidity",
"unit": "%"
},
"native": {}
"native": {}
},
"nextHour.RelativeHumidity": {
"type": "state",
"common": {
"name": "Humidity",
"type": "number",
"read": true,
"write": false,
"role": "value.humidity",
"unit": "%"
},
"nextHour.UVIndex": {
"type": "state",
"common": {
"name": "UV Index",
"type": "number",
"read": true,
"write": false,
"role": "value"
},
"native": {}
"native": {}
},
"nextHour.UVIndex": {
"type": "state",
"common": {
"name": "UV Index",
"type": "number",
"read": true,
"write": false,
"role": "value"
},
"nextHour.UVIndexText": {
"type": "state",
"common": {
"name": "UV Index Description",
"type": "string",
"read": true,
"write": false,
"role": "value"
},
"native": {}
"native": {}
},
"nextHour.UVIndexText": {
"type": "state",
"common": {
"name": "UV Index Description",
"type": "string",
"read": true,
"write": false,
"role": "value"
},
"nextHour.PrecipitationProbability": {
"type": "state",
"common": {
"name": "Precipitation Probability",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation",
"unit":"%"
},
"native": {}
"native": {}
},
"nextHour.PrecipitationProbability": {
"type": "state",
"common": {
"name": "Precipitation Probability",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation",
"unit": "%"
},
"nextHour.RainProbability": {
"type": "state",
"common": {
"name": "Rain Probability",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit":"%"
},
"native": {}
"native": {}
},
"nextHour.RainProbability": {
"type": "state",
"common": {
"name": "Rain Probability",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit": "%"
},
"nextHour.SnowProbability": {
"type": "state",
"common": {
"name": "Snow Probability",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit":"%"
},
"native": {}
"native": {}
},
"nextHour.SnowProbability": {
"type": "state",
"common": {
"name": "Snow Probability",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit": "%"
},
"nextHour.IceProbability": {
"type": "state",
"common": {
"name": "Ice Probability",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit":"%"
},
"native": {}
"native": {}
},
"nextHour.IceProbability": {
"type": "state",
"common": {
"name": "Ice Probability",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit": "%"
},
"nextHour.RainVolume":{
"type": "state",
"common": {
"name": "Rain Amount",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit":"mm"
},
"native": {}
"native": {}
},
"nextHour.RainVolume": {
"type": "state",
"common": {
"name": "Rain Amount",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit": "mm"
},
"nextHour.SnowVolume":{
"type": "state",
"common": {
"name": "Snow Amount",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit":"mm"
},
"native": {}
"native": {}
},
"nextHour.SnowVolume": {
"type": "state",
"common": {
"name": "Snow Amount",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit": "mm"
},
"nextHour.IceVolume":{
"type": "state",
"common": {
"name": "Ice Amount",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit":"mm"
},
"native": {}
"native": {}
},
"nextHour.IceVolume": {
"type": "state",
"common": {
"name": "Ice Amount",
"type": "number",
"read": true,
"write": false,
"role": "value",
"unit": "mm"
},
"nextHour.TotalLiquidVolume": {
"type": "state",
"common": {
"name": "Total Precipitation Amount",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation",
"unit":"mm"
},
"native": {}
}
"native": {}
},
"nextHour.TotalLiquidVolume": {
"type": "state",
"common": {
"name": "Total Precipitation Amount",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation",
"unit": "mm"
},
"native": {}
}
}
{
"Summary.CurrentDateTime": {
"type": "state",
"common": {
"name": "Forecast date",
"type": "string",
"read": true,
"write": false,
"role": "date.forecast.0"
},
"native": {}
"Summary.CurrentDateTime": {
"type": "state",
"common": {
"name": "Forecast date",
"type": "string",
"read": true,
"write": false,
"role": "date.forecast.0"
},
"Summary.WeatherIcon": {
"type": "state",
"common": {
"name": "Weather Icon",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon.name.forecast.0"
},
"native": {}
"native": {}
},
"Summary.WeatherIcon": {
"type": "state",
"common": {
"name": "Weather Icon",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon.name.forecast.0"
},
"Summary.WeatherIconURL": {
"type": "state",
"common": {
"name": "SVG Weather Icon URL",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon.forecast.0"
},
"native": {}
"native": {}
},
"Summary.WeatherIconURL": {
"type": "state",
"common": {
"name": "SVG Weather Icon URL",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon.forecast.0"
},
"Summary.WeatherText": {
"type": "state",
"common": {
"name": "Weather Description",
"type": "string",
"read": true,
"write": false,
"role": "weather.state.forecast.0"
},
"native": {}
"native": {}
},
"Summary.WeatherText": {
"type": "state",
"common": {
"name": "Weather Description",
"type": "string",
"read": true,
"write": false,
"role": "weather.state.forecast.0"
},
"Summary.Temperature": {
"type": "state",
"common": {
"name": "Temperature",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.forecast.0",
"unit": "°C"
},
"native": {}
"native": {}
},
"Summary.Temperature": {
"type": "state",
"common": {
"name": "Temperature",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.forecast.0",
"unit": "°C"
},
"Summary.HoursOfSun": {
"type": "state",
"common": {
"name": "Hours of Sun",
"type": "number",
"read": true,
"write": false,
"role": "value.HoursOfSun"
},
"native": {}
"native": {}
},
"Summary.HoursOfSun": {
"type": "state",
"common": {
"name": "Hours of Sun",
"type": "number",
"read": true,
"write": false,
"role": "value.HoursOfSun"
},
"Summary.RealFeelTemperature": {
"type": "state",
"common": {
"name": "Feels Like Temperature",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.feelslike.forecast.0",
"unit": "°C"
},
"native": {}
"native": {}
},
"Summary.RealFeelTemperature": {
"type": "state",
"common": {
"name": "Feels Like Temperature",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.feelslike.forecast.0",
"unit": "°C"
},
"Summary.WindSpeed":{
"type": "state",
"common": {
"name": "Wind Speed",
"type": "number",
"read": true,
"write": false,
"role": "value.speed.wind.forecast.0",
"unit": "km/h"
},
"native": {}
"native": {}
},
"Summary.WindSpeed": {
"type": "state",
"common": {
"name": "Wind Speed",
"type": "number",
"read": true,
"write": false,
"role": "value.speed.wind.forecast.0",
"unit": "km/h"
},
"Summary.WindDirection": {
"type": "state",
"common": {
"name": "Wind Direction",
"type": "number",
"read": true,
"write": false,
"role": "value.direction.wind.forecast.0",
"unit": "°"
},
"native": {}
"native": {}
},
"Summary.WindDirection": {
"type": "state",
"common": {
"name": "Wind Direction",
"type": "number",
"read": true,
"write": false,
"role": "value.direction.wind.forecast.0",
"unit": "°"
},
"Summary.WindDirectionStr": {
"type": "state",
"common": {
"name": "Wind Direction",
"type": "string",
"read": true,
"write": false,
"role": "weather.direction.wind.forecast.0",
"unit": ""
},
"native": {}
"native": {}
},
"Summary.WindDirectionStr": {
"type": "state",
"common": {
"name": "Wind Direction",
"type": "string",
"read": true,
"write": false,
"role": "weather.direction.wind.forecast.0",
"unit": ""
},
"Summary.RelativeHumidity": {
"type": "state",
"common": {
"name": "Humidity",
"type": "number",
"read": true,
"write": false,
"role": "value.humidity.forecast.0",
"unit": "%"
},
"native": {}
"native": {}
},
"Summary.RelativeHumidity": {
"type": "state",
"common": {
"name": "Humidity",
"type": "number",
"read": true,
"write": false,
"role": "value.humidity.forecast.0",
"unit": "%"
},
"Summary.Pressure": {
"type": "state",
"common": {
"name": "Pressure",
"type": "number",
"read": true,
"write": false,
"role": "value.pressure",
"unit":"mmHg"
},
"native": {}
"native": {}
},
"Summary.Pressure": {
"type": "state",
"common": {
"name": "Pressure",
"type": "number",
"read": true,
"write": false,
"role": "value.pressure",
"unit": "mmHg"
},
"Summary.DayOfWeek": {
"type": "state",
"common": {
"name": "Day of week",
"type": "string",
"read": true,
"write": false,
"role": "dayofweek.forecast.0",
"unit":""
},
"native": {}
"native": {}
},
"Summary.DayOfWeek": {
"type": "state",
"common": {
"name": "Day of week",
"type": "string",
"read": true,
"write": false,
"role": "dayofweek.forecast.0",
"unit": ""
},
"Summary.Sunrise": {
"type": "state",
"common": {
"name": "Sunrise time",
"type": "string",
"read": true,
"write": false,
"role": "time.sunrise",
"unit":""
},
"native": {}
"native": {}
},
"Summary.Sunrise": {
"type": "state",
"common": {
"name": "Sunrise time",
"type": "string",
"read": true,
"write": false,
"role": "time.sunrise",
"unit": ""
},
"Summary.Sunset": {
"type": "state",
"common": {
"name": "Sunset time",
"type": "string",
"read": true,
"write": false,
"role": "time.sunset",
"unit":""
},
"native": {}
"native": {}
},
"Summary.Sunset": {
"type": "state",
"common": {
"name": "Sunset time",
"type": "string",
"read": true,
"write": false,
"role": "time.sunset",
"unit": ""
},
"Summary.DateTime_d1": {
"type": "state",
"common": {
"name": "Forecast date day 1",
"type": "string",
"read": true,
"write": false,
"role": "date.forecast.0"
},
"native": {}
"native": {}
},
"Summary.DateTime_d1": {
"type": "state",
"common": {
"name": "Forecast date day 1",
"type": "string",
"read": true,
"write": false,
"role": "date.forecast.0"
},
"Summary.WeatherIcon_d1": {
"type": "state",
"common": {
"name": "Weather Icon day 1",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon.name.forecast.0"
},
"native": {}
"native": {}
},
"Summary.WeatherIcon_d1": {
"type": "state",
"common": {
"name": "Weather Icon day 1",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon.name.forecast.0"
},
"Summary.WeatherIconURL_d1": {
"type": "state",
"common": {
"name": "SVG Weather Icon URL day 1",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon.forecast.0"
},
"native": {}
"native": {}
},
"Summary.WeatherIconURL_d1": {
"type": "state",
"common": {
"name": "SVG Weather Icon URL day 1",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon.forecast.0"
},
"Summary.WeatherText_d1": {
"type": "state",
"common": {
"name": "Weather Description day 1",
"type": "string",
"read": true,
"write": false,
"role": "weather.state.forecast.0"
},
"native": {}
"native": {}
},
"Summary.WeatherText_d1": {
"type": "state",
"common": {
"name": "Weather Description day 1",
"type": "string",
"read": true,
"write": false,
"role": "weather.state.forecast.0"
},
"Summary.TempMin_d1": {
"type": "state",
"common": {
"name": "Min Temperature day 1",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.min.forecast.0",
"unit": "°C"
},
"native": {}
}
,
"Summary.TempMax_d1": {
"type": "state",
"common": {
"name": "Max Temperature day 1",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.max.forecast.0",
"unit": "°C"
},
"native": {}
"native": {}
},
"Summary.TempMin_d1": {
"type": "state",
"common": {
"name": "Min Temperature day 1",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.min.forecast.0",
"unit": "°C"
},
"Summary.WindSpeed_d1":{
"type": "state",
"common": {
"name": "Wind Speed day 1",
"type": "number",
"read": true,
"write": false,
"role": "value.speed.wind.forecast.0",
"unit": "km/h"
},
"native": {}
"native": {}
},
"Summary.TempMax_d1": {
"type": "state",
"common": {
"name": "Max Temperature day 1",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.max.forecast.0",
"unit": "°C"
},
"Summary.WindDirection_d1": {
"type": "state",
"common": {
"name": "Wind Direction day 1",
"type": "number",
"read": true,
"write": false,
"role": "value.direction.wind.forecast.0",
"unit": "°"
},
"native": {}
"native": {}
},
"Summary.WindSpeed_d1": {
"type": "state",
"common": {
"name": "Wind Speed day 1",
"type": "number",
"read": true,
"write": false,
"role": "value.speed.wind.forecast.0",
"unit": "km/h"
},
"Summary.WindDirectionStr_d1": {
"type": "state",
"common": {
"name": "Wind Direction day 1",
"type": "string",
"read": true,
"write": false,
"role": "weather.direction.wind.forecast.0",
"unit": ""
},
"native": {}
"native": {}
},
"Summary.WindDirection_d1": {
"type": "state",
"common": {
"name": "Wind Direction day 1",
"type": "number",
"read": true,
"write": false,
"role": "value.direction.wind.forecast.0",
"unit": "°"
},
"Summary.DayOfWeek_d1": {
"type": "state",
"common": {
"name": "Day of week day 1",
"type": "string",
"read": true,
"write": false,
"role": "dayofweek.forecast.0",
"unit":""
},
"native": {}
"native": {}
},
"Summary.WindDirectionStr_d1": {
"type": "state",
"common": {
"name": "Wind Direction day 1",
"type": "string",
"read": true,
"write": false,
"role": "weather.direction.wind.forecast.0",
"unit": ""
},
"Summary.PrecipitationProbability_d1": {
"type": "state",
"common": {
"name": "Precipitation Probability day 1",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation.forecast.0",
"unit":"%"
},
"native": {}
"native": {}
},
"Summary.DayOfWeek_d1": {
"type": "state",
"common": {
"name": "Day of week day 1",
"type": "string",
"read": true,
"write": false,
"role": "dayofweek.forecast.0",
"unit": ""
},
"Summary.TotalLiquidVolume_d1": {
"type": "state",
"common": {
"name": "Total Precipitation Amount day 1",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation.forecast.0",
"unit":"mm"
},
"native": {}
"native": {}
},
"Summary.PrecipitationProbability_d1": {
"type": "state",
"common": {
"name": "Precipitation Probability day 1",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation.forecast.0",
"unit": "%"
},
"Summary.DateTime_d2": {
"type": "state",
"common": {
"name": "Forecast date day 2",
"type": "string",
"read": true,
"write": false,
"role": "date.forecast.1"
},
"native": {}
"native": {}
},
"Summary.TotalLiquidVolume_d1": {
"type": "state",
"common": {
"name": "Total Precipitation Amount day 1",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation.forecast.0",
"unit": "mm"
},
"Summary.WeatherIcon_d2": {
"type": "state",
"common": {
"name": "Weather Icon day 2",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon.name.forecast.1"
},
"native": {}
"native": {}
},
"Summary.DateTime_d2": {
"type": "state",
"common": {
"name": "Forecast date day 2",
"type": "string",
"read": true,
"write": false,
"role": "date.forecast.1"
},
"Summary.WeatherIconURL_d2": {
"type": "state",
"common": {
"name": "SVG Weather Icon URL day 2",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon.forecast.1"
},
"native": {}
"native": {}
},
"Summary.WeatherIcon_d2": {
"type": "state",
"common": {
"name": "Weather Icon day 2",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon.name.forecast.1"
},
"Summary.WeatherText_d2": {
"type": "state",
"common": {
"name": "Weather Description day 2",
"type": "string",
"read": true,
"write": false,
"role": "weather.state.forecast.1"
},
"native": {}
"native": {}
},
"Summary.WeatherIconURL_d2": {
"type": "state",
"common": {
"name": "SVG Weather Icon URL day 2",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon.forecast.1"
},
"Summary.TempMin_d2": {
"type": "state",
"common": {
"name": "Min Temperature day 2",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.min.forecast.1",
"unit": "°C"
},
"native": {}
}
,
"Summary.TempMax_d2": {
"type": "state",
"common": {
"name": "Max Temperature day 2",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.max.forecast.1",
"unit": "°C"
},
"native": {}
"native": {}
},
"Summary.WeatherText_d2": {
"type": "state",
"common": {
"name": "Weather Description day 2",
"type": "string",
"read": true,
"write": false,
"role": "weather.state.forecast.1"
},
"Summary.WindSpeed_d2":{
"type": "state",
"common": {
"name": "Wind Speed day 2",
"type": "number",
"read": true,
"write": false,
"role": "value.speed.wind.forecast.1",
"unit": "km/h"
},
"native": {}
"native": {}
},
"Summary.TempMin_d2": {
"type": "state",
"common": {
"name": "Min Temperature day 2",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.min.forecast.1",
"unit": "°C"
},
"Summary.WindDirection_d2": {
"type": "state",
"common": {
"name": "Wind Direction day 2",
"type": "number",
"read": true,
"write": false,
"role": "value.direction.wind.forecast.1",
"unit": "°"
},
"native": {}
"native": {}
},
"Summary.TempMax_d2": {
"type": "state",
"common": {
"name": "Max Temperature day 2",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.max.forecast.1",
"unit": "°C"
},
"Summary.WindDirectionStr_d2": {
"type": "state",
"common": {
"name": "Wind Direction day 2",
"type": "string",
"read": true,
"write": false,
"role": "weather.direction.wind.forecast.1",
"unit": ""
},
"native": {}
"native": {}
},
"Summary.WindSpeed_d2": {
"type": "state",
"common": {
"name": "Wind Speed day 2",
"type": "number",
"read": true,
"write": false,
"role": "value.speed.wind.forecast.1",
"unit": "km/h"
},
"Summary.DayOfWeek_d2": {
"type": "state",
"common": {
"name": "Day of week day 2",
"type": "string",
"read": true,
"write": false,
"role": "dayofweek.forecast.1",
"unit":""
},
"native": {}
"native": {}
},
"Summary.WindDirection_d2": {
"type": "state",
"common": {
"name": "Wind Direction day 2",
"type": "number",
"read": true,
"write": false,
"role": "value.direction.wind.forecast.1",
"unit": "°"
},
"Summary.PrecipitationProbability_d2": {
"type": "state",
"common": {
"name": "Precipitation Probability day 2",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation.forecast.1",
"unit":"%"
},
"native": {}
"native": {}
},
"Summary.WindDirectionStr_d2": {
"type": "state",
"common": {
"name": "Wind Direction day 2",
"type": "string",
"read": true,
"write": false,
"role": "weather.direction.wind.forecast.1",
"unit": ""
},
"Summary.TotalLiquidVolume_d2": {
"type": "state",
"common": {
"name": "Total Precipitation Amount day 2",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation.forecast.1",
"unit":"mm"
},
"native": {}
"native": {}
},
"Summary.DayOfWeek_d2": {
"type": "state",
"common": {
"name": "Day of week day 2",
"type": "string",
"read": true,
"write": false,
"role": "dayofweek.forecast.1",
"unit": ""
},
"Summary.DateTime_d3": {
"type": "state",
"common": {
"name": "Forecast date day 3",
"type": "string",
"read": true,
"write": false,
"role": "date.forecast.2"
},
"native": {}
"native": {}
},
"Summary.PrecipitationProbability_d2": {
"type": "state",
"common": {
"name": "Precipitation Probability day 2",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation.forecast.1",
"unit": "%"
},
"Summary.WeatherIcon_d3": {
"type": "state",
"common": {
"name": "Weather Icon day 3",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon.name.forecast.2"
},
"native": {}
"native": {}
},
"Summary.TotalLiquidVolume_d2": {
"type": "state",
"common": {
"name": "Total Precipitation Amount day 2",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation.forecast.1",
"unit": "mm"
},
"Summary.WeatherIconURL_d3": {
"type": "state",
"common": {
"name": "SVG Weather Icon URL day 3",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon.forecast.2"
},
"native": {}
"native": {}
},
"Summary.DateTime_d3": {
"type": "state",
"common": {
"name": "Forecast date day 3",
"type": "string",
"read": true,
"write": false,
"role": "date.forecast.2"
},
"Summary.WeatherText_d3": {
"type": "state",
"common": {
"name": "Weather Description day 3",
"type": "string",
"read": true,
"write": false,
"role": "weather.state.forecast.2"
},
"native": {}
"native": {}
},
"Summary.WeatherIcon_d3": {
"type": "state",
"common": {
"name": "Weather Icon day 3",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon.name.forecast.2"
},
"Summary.TempMin_d3": {
"type": "state",
"common": {
"name": "Min Temperature day 3",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.min.forecast.2",
"unit": "°C"
},
"native": {}
}
,
"Summary.TempMax_d3": {
"type": "state",
"common": {
"name": "Max Temperature day 3",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.max.forecast.2",
"unit": "°C"
},
"native": {}
"native": {}
},
"Summary.WeatherIconURL_d3": {
"type": "state",
"common": {
"name": "SVG Weather Icon URL day 3",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon.forecast.2"
},
"Summary.WindSpeed_d3":{
"type": "state",
"common": {
"name": "Wind Speed day 3",
"type": "number",
"read": true,
"write": false,
"role": "value.speed.wind.forecast.2",
"unit": "km/h"
},
"native": {}
"native": {}
},
"Summary.WeatherText_d3": {
"type": "state",
"common": {
"name": "Weather Description day 3",
"type": "string",
"read": true,
"write": false,
"role": "weather.state.forecast.2"
},
"Summary.WindDirection_d3": {
"type": "state",
"common": {
"name": "Wind Direction day 3",
"type": "number",
"read": true,
"write": false,
"role": "value.direction.wind.forecast.2",
"unit": "°"
},
"native": {}
"native": {}
},
"Summary.TempMin_d3": {
"type": "state",
"common": {
"name": "Min Temperature day 3",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.min.forecast.2",
"unit": "°C"
},
"Summary.WindDirectionStr_d3": {
"type": "state",
"common": {
"name": "Wind Direction day 3",
"type": "string",
"read": true,
"write": false,
"role": "weather.direction.wind.forecast.2",
"unit": ""
},
"native": {}
"native": {}
},
"Summary.TempMax_d3": {
"type": "state",
"common": {
"name": "Max Temperature day 3",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.max.forecast.2",
"unit": "°C"
},
"Summary.DayOfWeek_d3": {
"type": "state",
"common": {
"name": "Day of week day 3",
"type": "string",
"read": true,
"write": false,
"role": "dayofweek.forecast.2",
"unit":""
},
"native": {}
"native": {}
},
"Summary.WindSpeed_d3": {
"type": "state",
"common": {
"name": "Wind Speed day 3",
"type": "number",
"read": true,
"write": false,
"role": "value.speed.wind.forecast.2",
"unit": "km/h"
},
"Summary.PrecipitationProbability_d3": {
"type": "state",
"common": {
"name": "Precipitation Probability day 3",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation.forecast.2",
"unit":"%"
},
"native": {}
"native": {}
},
"Summary.WindDirection_d3": {
"type": "state",
"common": {
"name": "Wind Direction day 3",
"type": "number",
"read": true,
"write": false,
"role": "value.direction.wind.forecast.2",
"unit": "°"
},
"Summary.TotalLiquidVolume_d3": {
"type": "state",
"common": {
"name": "Total Precipitation Amount day 3",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation.forecast.2",
"unit":"mm"
},
"native": {}
"native": {}
},
"Summary.WindDirectionStr_d3": {
"type": "state",
"common": {
"name": "Wind Direction day 3",
"type": "string",
"read": true,
"write": false,
"role": "weather.direction.wind.forecast.2",
"unit": ""
},
"Summary.DateTime_d4": {
"type": "state",
"common": {
"name": "Forecast date day 4",
"type": "string",
"read": true,
"write": false,
"role": "date.forecast.3"
},
"native": {}
"native": {}
},
"Summary.DayOfWeek_d3": {
"type": "state",
"common": {
"name": "Day of week day 3",
"type": "string",
"read": true,
"write": false,
"role": "dayofweek.forecast.2",
"unit": ""
},
"Summary.WeatherIcon_d4": {
"type": "state",
"common": {
"name": "Weather Icon day 4",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon.name.forecast.3"
},
"native": {}
"native": {}
},
"Summary.PrecipitationProbability_d3": {
"type": "state",
"common": {
"name": "Precipitation Probability day 3",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation.forecast.2",
"unit": "%"
},
"Summary.WeatherIconURL_d4": {
"type": "state",
"common": {
"name": "SVG Weather Icon URL day 4",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon.forecast.3"
},
"native": {}
"native": {}
},
"Summary.TotalLiquidVolume_d3": {
"type": "state",
"common": {
"name": "Total Precipitation Amount day 3",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation.forecast.2",
"unit": "mm"
},
"Summary.WeatherText_d4": {
"type": "state",
"common": {
"name": "Weather Description day 4",
"type": "string",
"read": true,
"write": false,
"role": "weather.state.forecast.3"
},
"native": {}
"native": {}
},
"Summary.DateTime_d4": {
"type": "state",
"common": {
"name": "Forecast date day 4",
"type": "string",
"read": true,
"write": false,
"role": "date.forecast.3"
},
"Summary.TempMin_d4": {
"type": "state",
"common": {
"name": "Min Temperature day 4",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.min.forecast.3",
"unit": "°C"
},
"native": {}
}
,
"Summary.TempMax_d4": {
"type": "state",
"common": {
"name": "Max Temperature day 4",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.max.forecast.3",
"unit": "°C"
},
"native": {}
"native": {}
},
"Summary.WeatherIcon_d4": {
"type": "state",
"common": {
"name": "Weather Icon day 4",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon.name.forecast.3"
},
"Summary.WindSpeed_d4":{
"type": "state",
"common": {
"name": "Wind Speed day 4",
"type": "number",
"read": true,
"write": false,
"role": "value.speed.wind.forecast.3",
"unit": "km/h"
},
"native": {}
"native": {}
},
"Summary.WeatherIconURL_d4": {
"type": "state",
"common": {
"name": "SVG Weather Icon URL day 4",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon.forecast.3"
},
"Summary.WindDirection_d4": {
"type": "state",
"common": {
"name": "Wind Direction day 4",
"type": "number",
"read": true,
"write": false,
"role": "value.direction.wind.forecast.3",
"unit": "°"
},
"native": {}
"native": {}
},
"Summary.WeatherText_d4": {
"type": "state",
"common": {
"name": "Weather Description day 4",
"type": "string",
"read": true,
"write": false,
"role": "weather.state.forecast.3"
},
"Summary.WindDirectionStr_d4": {
"type": "state",
"common": {
"name": "Wind Direction day 4",
"type": "string",
"read": true,
"write": false,
"role": "weather.direction.wind.forecast.3",
"unit": ""
},
"native": {}
"native": {}
},
"Summary.TempMin_d4": {
"type": "state",
"common": {
"name": "Min Temperature day 4",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.min.forecast.3",
"unit": "°C"
},
"Summary.DayOfWeek_d4": {
"type": "state",
"common": {
"name": "Day of week day 4",
"type": "string",
"read": true,
"write": false,
"role": "dayofweek.forecast.3",
"unit":""
},
"native": {}
"native": {}
},
"Summary.TempMax_d4": {
"type": "state",
"common": {
"name": "Max Temperature day 4",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.max.forecast.3",
"unit": "°C"
},
"Summary.PrecipitationProbability_d4": {
"type": "state",
"common": {
"name": "Precipitation Probability day 4",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation.forecast.3",
"unit":"%"
},
"native": {}
"native": {}
},
"Summary.WindSpeed_d4": {
"type": "state",
"common": {
"name": "Wind Speed day 4",
"type": "number",
"read": true,
"write": false,
"role": "value.speed.wind.forecast.3",
"unit": "km/h"
},
"Summary.TotalLiquidVolume_d4": {
"type": "state",
"common": {
"name": "Total Precipitation Amount day 4",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation.forecast.3",
"unit":"mm"
},
"native": {}
"native": {}
},
"Summary.WindDirection_d4": {
"type": "state",
"common": {
"name": "Wind Direction day 4",
"type": "number",
"read": true,
"write": false,
"role": "value.direction.wind.forecast.3",
"unit": "°"
},
"Summary.DateTime_d5": {
"type": "state",
"common": {
"name": "Forecast date day 5",
"type": "string",
"read": true,
"write": false,
"role": "date.forecast.4"
},
"native": {}
"native": {}
},
"Summary.WindDirectionStr_d4": {
"type": "state",
"common": {
"name": "Wind Direction day 4",
"type": "string",
"read": true,
"write": false,
"role": "weather.direction.wind.forecast.3",
"unit": ""
},
"Summary.WeatherIcon_d5": {
"type": "state",
"common": {
"name": "Weather Icon day 5",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon.name.forecast.4"
},
"native": {}
"native": {}
},
"Summary.DayOfWeek_d4": {
"type": "state",
"common": {
"name": "Day of week day 4",
"type": "string",
"read": true,
"write": false,
"role": "dayofweek.forecast.3",
"unit": ""
},
"Summary.WeatherIconURL_d5": {
"type": "state",
"common": {
"name": "SVG Weather Icon URL day 5",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon.forecast.4"
},
"native": {}
"native": {}
},
"Summary.PrecipitationProbability_d4": {
"type": "state",
"common": {
"name": "Precipitation Probability day 4",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation.forecast.3",
"unit": "%"
},
"Summary.WeatherText_d5": {
"type": "state",
"common": {
"name": "Weather Description day 5",
"type": "string",
"read": true,
"write": false,
"role": "weather.state.forecast.4"
},
"native": {}
"native": {}
},
"Summary.TotalLiquidVolume_d4": {
"type": "state",
"common": {
"name": "Total Precipitation Amount day 4",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation.forecast.3",
"unit": "mm"
},
"Summary.TempMin_d5": {
"type": "state",
"common": {
"name": "Min Temperature day 5",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.min.forecast.4",
"unit": "°C"
},
"native": {}
}
,
"Summary.TempMax_d5": {
"type": "state",
"common": {
"name": "Max Temperature day 5",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.max.forecast.4",
"unit": "°C"
},
"native": {}
"native": {}
},
"Summary.DateTime_d5": {
"type": "state",
"common": {
"name": "Forecast date day 5",
"type": "string",
"read": true,
"write": false,
"role": "date.forecast.4"
},
"Summary.WindSpeed_d5":{
"type": "state",
"common": {
"name": "Wind Speed day 5",
"type": "number",
"read": true,
"write": false,
"role": "value.speed.wind.forecast.4",
"unit": "km/h"
},
"native": {}
"native": {}
},
"Summary.WeatherIcon_d5": {
"type": "state",
"common": {
"name": "Weather Icon day 5",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon.name.forecast.4"
},
"Summary.WindDirection_d5": {
"type": "state",
"common": {
"name": "Wind Direction day 5",
"type": "number",
"read": true,
"write": false,
"role": "value.direction.wind.forecast.4",
"unit": "°"
},
"native": {}
"native": {}
},
"Summary.WeatherIconURL_d5": {
"type": "state",
"common": {
"name": "SVG Weather Icon URL day 5",
"type": "string",
"read": true,
"write": false,
"role": "weather.icon.forecast.4"
},
"Summary.WindDirectionStr_d5": {
"type": "state",
"common": {
"name": "Wind Direction day 5",
"type": "string",
"read": true,
"write": false,
"role": "weather.direction.wind.forecast.4",
"unit": ""
},
"native": {}
"native": {}
},
"Summary.WeatherText_d5": {
"type": "state",
"common": {
"name": "Weather Description day 5",
"type": "string",
"read": true,
"write": false,
"role": "weather.state.forecast.4"
},
"Summary.DayOfWeek_d5": {
"type": "state",
"common": {
"name": "Day of week day 5",
"type": "string",
"read": true,
"write": false,
"role": "dayofweek.forecast.4",
"unit":""
},
"native": {}
"native": {}
},
"Summary.TempMin_d5": {
"type": "state",
"common": {
"name": "Min Temperature day 5",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.min.forecast.4",
"unit": "°C"
},
"Summary.PrecipitationProbability_d5": {
"type": "state",
"common": {
"name": "Precipitation Probability day 5",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation.forecast.4",
"unit":"%"
},
"native": {}
"native": {}
},
"Summary.TempMax_d5": {
"type": "state",
"common": {
"name": "Max Temperature day 5",
"type": "number",
"read": true,
"write": false,
"role": "value.temperature.max.forecast.4",
"unit": "°C"
},
"Summary.TotalLiquidVolume_d5": {
"type": "state",
"common": {
"name": "Total Precipitation Amount day 5",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation.forecast.4",
"unit":"mm"
},
"native": {}
}
"native": {}
},
"Summary.WindSpeed_d5": {
"type": "state",
"common": {
"name": "Wind Speed day 5",
"type": "number",
"read": true,
"write": false,
"role": "value.speed.wind.forecast.4",
"unit": "km/h"
},
"native": {}
},
"Summary.WindDirection_d5": {
"type": "state",
"common": {
"name": "Wind Direction day 5",
"type": "number",
"read": true,
"write": false,
"role": "value.direction.wind.forecast.4",
"unit": "°"
},
"native": {}
},
"Summary.WindDirectionStr_d5": {
"type": "state",
"common": {
"name": "Wind Direction day 5",
"type": "string",
"read": true,
"write": false,
"role": "weather.direction.wind.forecast.4",
"unit": ""
},
"native": {}
},
"Summary.DayOfWeek_d5": {
"type": "state",
"common": {
"name": "Day of week day 5",
"type": "string",
"read": true,
"write": false,
"role": "dayofweek.forecast.4",
"unit": ""
},
"native": {}
},
"Summary.PrecipitationProbability_d5": {
"type": "state",
"common": {
"name": "Precipitation Probability day 5",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation.forecast.4",
"unit": "%"
},
"native": {}
},
"Summary.TotalLiquidVolume_d5": {
"type": "state",
"common": {
"name": "Total Precipitation Amount day 5",
"type": "number",
"read": true,
"write": false,
"role": "value.precipitation.forecast.4",
"unit": "mm"
},
"native": {}
}
}

@@ -17,3 +17,2 @@ "use strict";

class Accuweather extends utils.Adapter {
/**

@@ -52,3 +51,3 @@ * @param {Partial<ioBroker.AdapterOptions>} [options={}]

setDailyStates(obj) {
async setDailyStates(obj) {
const days = obj.DailyForecasts;

@@ -63,29 +62,29 @@ try {

dt = new Date(json[key]);
this.setState("Daily.Day" + day + "." + key, { val: json[key], ack: true });
this.setState("Summary.DateTime_d" + day, { val: json[key], ack: true });
this.setState("Summary.DayOfWeek_d"+day, { val: dt.toLocaleString(this.config.language, {weekday: "short"}), ack: true });
await this.setStateAsync(`Daily.Day${day}.${key}`, { val: json[key], ack: true });
await this.setStateAsync(`Summary.DateTime_d${day}`, { val: json[key], ack: true });
await this.setStateAsync(`Summary.DayOfWeek_d${day}`, { val: dt.toLocaleString(this.config.language, {weekday: "short"}), ack: true });
break;
case "Sun":
this.setState("Daily.Day" + day + ".Sunrise", { val: json[key]["Rise"], ack: true });
this.setState("Daily.Day" + day + ".Sunset", { val: json[key]["Set"], ack: true });
await this.setStateAsync(`Daily.Day${day}.Sunrise`, { val: json[key]["Rise"], ack: true });
await this.setStateAsync(`Daily.Day${day}.Sunset`, { val: json[key]["Set"], ack: true });
if (day === 1) {
this.setState("Summary.Sunrise", { val: json[key]["Rise"], ack: true });
this.setState("Summary.Sunset", { val: json[key]["Set"], ack: true });
await this.setStateAsync("Summary.Sunrise", { val: json[key]["Rise"], ack: true });
await this.setStateAsync("Summary.Sunset", { val: json[key]["Set"], ack: true });
}
break;
case "HoursOfSun":
this.setState("Daily.Day" + day + ".HoursOfSun", { val: json[key], ack: true });
await this.setStateAsync(`Daily.Day${day}.HoursOfSun`, { val: json[key], ack: true });
if (day === 1) {
this.setState("Summary.HoursOfSun", { val: json[key], ack: true });
await this.setStateAsync("Summary.HoursOfSun", { val: json[key], ack: true });
}
break;
break;
case "Temperature":
this.setState("Daily.Day" + day + ".Temperature.Minimum", { val: json[key]["Minimum"].Value, ack: true });
this.setState("Daily.Day" + day + ".Temperature.Maximum", { val: json[key]["Maximum"].Value, ack: true });
this.setState("Summary.TempMin_d" + day, { val: json[key]["Minimum"].Value, ack: true });
this.setState("Summary.TempMax_d" + day, { val: json[key]["Maximum"].Value, ack: true });
await this.setStateAsync(`Daily.Day${day}.Temperature.Minimum`, { val: json[key]["Minimum"].Value, ack: true });
await this.setStateAsync(`Daily.Day${day}.Temperature.Maximum`, { val: json[key]["Maximum"].Value, ack: true });
await this.setStateAsync(`Summary.TempMin_d${day}`, { val: json[key]["Minimum"].Value, ack: true });
await this.setStateAsync(`Summary.TempMax_d${day}`, { val: json[key]["Maximum"].Value, ack: true });
break;
case "RealFeelTemperature":
this.setState("Daily.Day" + day + ".RealFeelTemperature.Minimum", { val: json[key]["Minimum"].Value, ack: true });
this.setState("Daily.Day" + day + ".RealFeelTemperature.Maximum", { val: json[key]["Maximum"].Value, ack: true });
await this.setStateAsync(`Daily.Day${day}.RealFeelTemperature.Minimum`, { val: json[key]["Minimum"].Value, ack: true });
await this.setStateAsync(`Daily.Day${day}.RealFeelTemperature.Maximum`, { val: json[key]["Maximum"].Value, ack: true });
break;

@@ -98,41 +97,37 @@ case "Day":

if (typeof json1[key1] !== "object") {
this.setState(`Daily.Day${day}.${key}.${key1}`, { val: json1[key1], ack: true });
await this.setStateAsync(`Daily.Day${day}.${key}.${key1}`, { val: json1[key1], ack: true });
if (key1 === "Icon") {
this.setState(`Daily.Day${day}.${key}.IconURL`, { val: "https://developer.accuweather.com/sites/default/files/" + String(json1[key1]).padStart(2, "0") + "-s.png", ack: true });
this.setState(`Daily.Day${day}.${key}.IconURLS`, { val: "http://vortex.accuweather.com/adc2010/images/slate/icons/" + String(json1[key1]).padStart(2, "0") + ".svg", ack: true });
await this.setStateAsync(`Daily.Day${day}.${key}.IconURL`, { val: `https://developer.accuweather.com/sites/default/files/${String(json1[key1]).padStart(2, "0")}-s.png`, ack: true });
await this.setStateAsync(`Daily.Day${day}.${key}.IconURLS`, { val: `http://vortex.accuweather.com/adc2010/images/slate/icons/${String(json1[key1]).padStart(2, "0")}.svg`, ack: true });
if (key === "Day") {
this.setState("Summary.WeatherIconURL_d" + day, { val: "http://vortex.accuweather.com/adc2010/images/slate/icons/" + String(json1[key1]).padStart(2, "0") + ".svg", ack: true });
this.setState("Summary.WeatherIcon_d"+day, { val: json1[key1], ack: true });
await this.setStateAsync(`Summary.WeatherIconURL_d${day}`, { val: `http://vortex.accuweather.com/adc2010/images/slate/icons/${String(json1[key1]).padStart(2, "0")}.svg`, ack: true });
await this.setStateAsync(`Summary.WeatherIcon_d${day}`, { val: json1[key1], ack: true });
}
} else
if (key === "Day") {
} else if (key === "Day") {
if (key1 === "IconPhrase") {
this.setState("Summary.WeatherText_d"+day, { val: json1[key1], ack: true });
} else this.setState(`Summary.${key1}_d${day}`, { val: json1[key1], ack: true });
await this.setStateAsync(`Summary.WeatherText_d${day}`, { val: json1[key1], ack: true });
} else {
await this.setStateAsync(`Summary.${key1}_d${day}`, { val: json1[key1], ack: true });
}
}
} else
if (typeof json1[key1] == "object") {
} else if (typeof json1[key1] == "object") {
if (json1[key1]["Value"] !== undefined) {
if (["TotalLiquid", "Rain", "Snow", "Ice"].includes(key1)) {
this.setState(`Daily.Day${day}.${key}.${key1}Volume`, { val: json1[key1].Value, ack: true });
await this.setStateAsync(`Daily.Day${day}.${key}.${key1}Volume`, { val: json1[key1].Value, ack: true });
if (key === "Day" && key1 === "TotalLiquid") {
this.setState("Summary.TotalLiquidVolume_d" + day, { val: json1[key1].Value, ack: true });
await this.setStateAsync(`Summary.TotalLiquidVolume_d${day}`, { val: json1[key1].Value, ack: true });
}
} else {
this.setState(`Daily.Day${day}.${key}.${key1}`, { val: json1[key1].Value, ack: true });
await this.setStateAsync(`Daily.Day${day}.${key}.${key1}`, { val: json1[key1].Value, ack: true });
}
} else
if (key1 === "Wind") {
this.setState(`Daily.Day${day}.${key}.WindSpeed`, { val: json1[key1].Speed.Value, ack: true });
this.setState(`Daily.Day${day}.${key}.WindDirection`, { val: json1[key1].Direction.Degrees, ack: true });
} else if (key1 === "Wind") {
await this.setStateAsync(`Daily.Day${day}.${key}.WindSpeed`, { val: json1[key1].Speed.Value, ack: true });
await this.setStateAsync(`Daily.Day${day}.${key}.WindDirection`, { val: json1[key1].Direction.Degrees, ack: true });
if (key === "Day") {
this.setState("Summary.WindSpeed_d" + day, { val: json1[key1].Speed.Value, ack: true });
this.setState("Summary.WindDirection_d" + day, { val: json1[key1].Direction.Degrees, ack: true });
this.setState("Summary.WindDirectionStr_d" + day, { val: this.getCardinalDirection(json1[key1].Direction.Degrees), ack: true });
await this.setStateAsync(`Summary.WindSpeed_d${day}`, { val: json1[key1].Speed.Value, ack: true });
await this.setStateAsync(`Summary.WindDirection_d${day}`, { val: json1[key1].Direction.Degrees, ack: true });
await this.setStateAsync(`Summary.WindDirectionStr_d${day}`, { val: this.getCardinalDirection(json1[key1].Direction.Degrees), ack: true });
}
} else
if (key1 === "WindGust") {
this.setState(`Daily.Day${day}.${key}.WindGust`, { val: json1[key1].Speed.Value, ack: true });
} else if (key1 === "WindGust") {
await this.setStateAsync(`Daily.Day${day}.${key}.WindGust`, { val: json1[key1].Speed.Value, ack: true });
}

@@ -153,3 +148,3 @@ }

setNextHourStates(obj, item, hour) {
async setNextHourStates(obj, item, hour) {
const json = obj[item];

@@ -159,23 +154,20 @@ try {

if (typeof json[key] !== "object") {
this.setState(`Hourly.h${hour}.${key}`, { val: json[key], ack: true });
await this.setStateAsync(`Hourly.h${hour}.${key}`, { val: json[key], ack: true });
if (key === "WeatherIcon") {
this.setState("Hourly.h" + hour + ".WeatherIconURL", { val: "https://developer.accuweather.com/sites/default/files/" + String(json[key]).padStart(2, "0") + "-s.png", ack: true });
this.setState("Hourly.h" + hour + ".WeatherIconURLS", { val: "http://vortex.accuweather.com/adc2010/images/slate/icons/" + String(json[key]).padStart(2, "0") + ".svg", ack: true });
await this.setStateAsync(`Hourly.h${hour}.WeatherIconURL`, { val: `https://developer.accuweather.com/sites/default/files/${String(json[key]).padStart(2, "0")}-s.png`, ack: true });
await this.setStateAsync(`Hourly.h${hour}.WeatherIconURLS`, { val: `http://vortex.accuweather.com/adc2010/images/slate/icons/${String(json[key]).padStart(2, "0")}.svg`, ack: true });
}
} else
if (typeof json[key] == "object") {
} else if (typeof json[key] == "object") {
if (json[key]["Value"] !== undefined) {
if (["TotalLiquid", "Rain", "Snow", "Ice"].includes(key)) {
this.setState("Hourly.h" + hour + "." + key + "Volume", { val: json[key].Value, ack: true });
await this.setStateAsync(`Hourly.h${hour}.${key}Volume`, { val: json[key].Value, ack: true });
} else {
this.setState("Hourly.h" + hour + "." + key, { val: json[key].Value, ack: true });
await this.setStateAsync(`Hourly.h${hour}.${key}`, { val: json[key].Value, ack: true });
}
} else
if (key === "Wind") {
this.setState("Hourly.h" + hour + ".WindSpeed", { val: json[key].Speed.Value, ack: true });
this.setState("Hourly.h" + hour + ".WindDirection", { val: json[key].Direction.Degrees, ack: true });
} else
if (key === "WindGust") {
this.setState("Hourly.h" + hour + ".WindGust", { val: json[key].Speed.Value, ack: true });
} else if (key === "Wind") {
await this.setStateAsync(`Hourly.h${hour}.WindSpeed`, { val: json[key].Speed.Value, ack: true });
await this.setStateAsync(`Hourly.h${hour}.WindDirection`, { val: json[key].Direction.Degrees, ack: true });
await this.setStateAsync(`Hourly.h${hour}.WindDirectionText`, { val: json[key].Direction.Localized , ack: true });
} else if (key === "WindGust") {
await this.setStateAsync(`Hourly.h${hour}.WindGust`, { val: json[key].Speed.Value, ack: true });
}

@@ -189,3 +181,3 @@ }

setCurrentStates(obj) {
async setCurrentStates(obj) {
const json = obj[0];

@@ -196,39 +188,34 @@ try {

if (typeof json[key] !== "object" || json[key] == null) {
this.setState("Current." + key, { val: json[key], ack: true });
await this.setStateAsync(`Current.${key}`, { val: json[key], ack: true });
if (key === "WeatherIcon") {
this.setState("Current" + ".WeatherIconURL", { val: "https://developer.accuweather.com/sites/default/files/" + String(json[key]).padStart(2, "0") + "-s.png", ack: true });
this.setState("Current" + ".WeatherIconURLS", { val: "http://vortex.accuweather.com/adc2010/images/slate/icons/" + String(json[key]).padStart(2, "0") + ".svg", ack: true });
this.setState("Summary.WeatherIconURL", { val: "http://vortex.accuweather.com/adc2010/images/slate/icons/" + String(json[key]).padStart(2, "0") + ".svg", ack: true });
this.setState("Summary.WeatherIcon", { val: json[key], ack: true });
} else
if (key === "LocalObservationDateTime") {
await this.setStateAsync("Current.WeatherIconURL", { val: `https://developer.accuweather.com/sites/default/files/${String(json[key]).padStart(2, "0")}-s.png`, ack: true });
await this.setStateAsync("Current.WeatherIconURLS", { val: `http://vortex.accuweather.com/adc2010/images/slate/icons/${String(json[key]).padStart(2, "0")}.svg`, ack: true });
await this.setStateAsync("Summary.WeatherIconURL", { val: `http://vortex.accuweather.com/adc2010/images/slate/icons/${String(json[key]).padStart(2, "0")}.svg`, ack: true });
await this.setStateAsync("Summary.WeatherIcon", { val: json[key], ack: true });
} else if (key === "LocalObservationDateTime") {
const dt = new Date(json[key]);
const dow = dt.toLocaleString(this.config.language, {weekday: "short"});
this.setState("Summary.CurrentDateTime", { val: json[key], ack: true });
this.setState("Summary.DayOfWeek", { val: dow, ack: true });
this.log.debug("Date " + dt + ", dow: "+ dt.toLocaleString(this.config.language, {weekday: "short"}));
await this.setStateAsync("Summary.CurrentDateTime", { val: json[key], ack: true });
await this.setStateAsync("Summary.DayOfWeek", { val: dow, ack: true });
this.log.debug(`Date ${dt}, dow: ${dt.toLocaleString(this.config.language, {weekday: "short"})}`);
} else {
await this.setStateAsync(`Summary.${key}`, { val: json[key], ack: true });
}
else {
this.setState("Summary." + key, { val: json[key], ack: true });
}
}
else if (json[key] !== null) {
} else if (json[key] !== null) {
if (json[key].Metric !== undefined) {
//this.log.debug(key + ": " + json[key].Metric.Value);
this.setState("Current." + key, { val: json[key].Metric.Value, ack: true });
this.setState("Summary." + key, { val: json[key].Metric.Value, ack: true });
} else
if (key === "Wind") {
this.setState("Current.WindSpeed", { val: json[key].Speed.Metric.Value, ack: true });
this.setState("Summary.WindSpeed", { val: json[key].Speed.Metric.Value, ack: true });
this.setState("Current.WindDirection", { val: json[key].Direction.Degrees, ack: true });
this.setState("Summary.WindDirection", { val: json[key].Direction.Degrees, ack: true });
this.setState("Summary.WindDirectionStr", { val: this.getCardinalDirection(json[key].Direction.Degrees), ack: true });
} else
if (key === "WindGust") {
this.setState("Current.WindGust", { val: json[key].Speed.Metric.Value, ack: true });
} else
if (key === "PressureTendency") {
this.setState("Current.PressureTendency", { val: json[key].LocalizedText, ack: true });
await this.setStateAsync(`Current.${key}`, { val: json[key].Metric.Value, ack: true });
await this.setStateAsync(`Summary.${key}`, { val: json[key].Metric.Value, ack: true });
} else if (key === "Wind") {
await this.setStateAsync("Current.WindSpeed", { val: json[key].Speed.Metric.Value, ack: true });
await this.setStateAsync("Summary.WindSpeed", { val: json[key].Speed.Metric.Value, ack: true });
await this.setStateAsync("Current.WindDirection", { val: json[key].Direction.Degrees, ack: true });
await this.setStateAsync("Current.WindDirectionText", { val: json[key].Direction.Localized, ack: true });
await this.setStateAsync("Summary.WindDirection", { val: json[key].Direction.Degrees, ack: true });
await this.setStateAsync("Summary.WindDirectionStr", { val: this.getCardinalDirection(json[key].Direction.Degrees), ack: true });
} else if (key === "WindGust") {
await this.setStateAsync("Current.WindGust", { val: json[key].Speed.Metric.Value, ack: true });
} else if (key === "PressureTendency") {
await this.setStateAsync("Current.PressureTendency", { val: json[key].LocalizedText, ack: true });
}

@@ -242,7 +229,7 @@ }

setHourlyStates(obj) {
async setHourlyStates(obj) {
for (const hr in obj) {
if (typeof obj[hr] === "object" && obj[hr]["DateTime"]) {
const d = new Date(obj[hr]["DateTime"]);
this.setNextHourStates(obj, hr, d.getHours());
await this.setNextHourStates(obj, hr, d.getHours());
}

@@ -252,3 +239,3 @@ }

requst5Days() {
request5Days() {
if (typeof this.forecast !== "undefined") {

@@ -264,12 +251,8 @@ const loc = this.config.loKey;

.get()
.then(res => {
//this.log.debug(JSON.stringify(res));
this.setDailyStates(res);
})
.catch(err =>
this.log.error(err));
.then(res => this.setDailyStates(res))
.catch(err => this.log.error(err));
}
}
requst12Hours() {
request12Hours() {
if (typeof this.forecast !== "undefined") {

@@ -285,12 +268,8 @@ const loc = this.config.loKey;

.get()
.then(res => {
//this.log.debug(JSON.stringify(res));
this.setHourlyStates(res);
})
.catch(err =>
this.log.error(err));
.then(res => this.setHourlyStates(res))
.catch(err => this.log.error(err));
}
}
requstCurrent() {
requestCurrent() {
if (typeof this.forecast !== "undefined") {

@@ -307,8 +286,4 @@ const loc = this.config.loKey;

.getCurrent()
.then(res => {
//this.log.debug(JSON.stringify(res));
this.setCurrentStates(res);
})
.catch(err =>
this.log.error(err));
.then(res => this.setCurrentStates(res))
.catch(err => this.log.error(err));
}

@@ -318,15 +293,24 @@ }

async onReady() {
this.getForeignObjectAsync(this.namespace)
.catch(() => null)
.then(obj => {
if (!obj) {
return this.setForeignObjectAsync(this.namespace, {type: "device", common: {name: "Accuweather device"}, native: {}});
}
});
let obj;
try {
obj = await this.getForeignObjectAsync(this.namespace);
} catch (e) {
// ignore
}
if (!obj) {
await this.setForeignObjectAsync(this.namespace, { type: "device", common: { name: "Accuweather device" }, native: {} });
}
nextHour.createHourlyForecastObjects(this);
nextHour.createCurrentConditionObjects(this);
nextHour.createDailyForecastObjects(this);
nextHour.createSummaryObjects(this);
if (!this.config.language) {
const systemConfig = await this.getForeignObjectAsync("system.config");
if (systemConfig && systemConfig.common && systemConfig.common.language) {
this.config.language = systemConfig.common.language;
}
}
await nextHour.createHourlyForecastObjects(this);
await nextHour.createCurrentConditionObjects(this);
await nextHour.createDailyForecastObjects(this);
await nextHour.createSummaryObjects(this);
this.log.debug(`API: ${this.config.apiKey}; Loc: ${this.config.loKey} Lang: ${this.config.language}`);

@@ -341,30 +325,29 @@

updateInterval = setInterval(() => {
const _this = this;
const cdt = new Date();
if ((cdt.getHours() === 7 || cdt.getHours() === 20) && cdt.getMinutes() < 5) {
const now = new Date();
if ((now.getHours() === 7 || now.getHours() === 20) && now.getMinutes() < 5) {
timeout1 = setTimeout(() => {
timeout1 = null;
_this.requst5Days();
this.request5Days();
}, Math.random() * 10000 + 1);
}
if (cdt.getMinutes() <= 5 && cdt.getMinutes() > 0) {
if (now.getMinutes() <= 5) {
timeout2 = setTimeout(() => {
timeout2 = null;
_this.requstCurrent();
this.requestCurrent();
}, Math.random() * 10000 + 1);
}
if ((cdt.getHours() === 6 || cdt.getHours() === 12 || cdt.getHours() === 18 || cdt.getHours() === 0) && cdt.getMinutes() <= 5) {
if ((now.getHours() === 6 || now.getHours() === 12 || now.getHours() === 18 || now.getHours() === 0) && now.getMinutes() <= 5) {
timeout1 = setTimeout(() => {
timeout1 = null;
_this.requst12Hours();
this.request12Hours();
}, Math.random() * 10000 + 1);
}
}, 300000);
}, 300000); // 5 minutes
this.requst12Hours();
this.requstCurrent();
this.requst5Days();
this.request12Hours();
this.requestCurrent();
this.request5Days();
/*
For every state in the system there has to be also an object of type state
For every state in the system, there has to be also an object of type state
Here a simple template for a boolean variable named "testVariable"

@@ -374,3 +357,2 @@ Because every adapter instance uses its own unique namespace variable names can't collide with other adapters variables

await this.setObjectNotExistsAsync("updateCurrent", {

@@ -410,5 +392,6 @@ type: "state",

// in this template all states changes inside the adapters namespace are subscribed
this.subscribeStates("update*");
// in this template, all states changes inside the adapter's namespace are subscribed
await this.subscribeStatesAsync("updateCurrent");
await this.subscribeStatesAsync("updateHourly");
await this.subscribeStatesAsync("updateDaily");
}

@@ -424,10 +407,15 @@

updateInterval && clearInterval(updateInterval);
updateInterval = null;
timeout1 && clearTimeout(timeout1);
timeout1 = null;
timeout2 && clearTimeout(timeout2);
updateInterval = null;
timeout1 = null;
timeout2 = null;
callback();
// @ts-ignore
callback = null;
} catch (e) {
callback();
callback && callback();
}

@@ -458,10 +446,8 @@ }

// The state was changed
if (id === this.namespace + ".updateCurrent") {
this.requstCurrent();
} else
if (id === this.namespace + ".updateHourly") {
this.requst12Hours();
} else
if (id === this.namespace + ".updateDaily") {
this.requst5Days();
if (id === `${this.namespace}.updateCurrent`) {
this.requestCurrent();
} else if (id === `${this.namespace}.updateHourly`) {
this.request12Hours();
} else if (id === `${this.namespace}.updateDaily`) {
this.request5Days();
}

@@ -468,0 +454,0 @@ this.log.debug(`state ${id} changed: ${state.val} (ack = ${state.ack})`);

{
"name": "iobroker.accuweather",
"version": "1.2.4",
"version": "1.3.0",
"description": "Weather forecast using AccuWeather API",

@@ -21,29 +21,37 @@ "author": {

"dependencies": {
"@iobroker/adapter-core": "^2.5.0",
"query-string": "^7.0.1",
"request": "^2.88.2"
"@iobroker/adapter-core": "^3.0.3",
"axios": "^1.4.0"
},
"devDependencies": {
"@alcalzone/release-script": "^3.4.2",
"@iobroker/testing": "^2.5.4",
"@types/chai": "^4.2.19",
"@types/chai-as-promised": "^7.1.4",
"@types/gulp": "^4.0.8",
"@types/mocha": "^9.0.0",
"@types/node": "^17.0.5",
"@alcalzone/release-script": "^3.6.0",
"@alcalzone/release-script-plugin-iobroker": "^3.6.0",
"@alcalzone/release-script-plugin-license": "^3.5.9",
"@iobroker/testing": "^4.1.0",
"@types/chai": "^4.3.5",
"@types/chai-as-promised": "^7.1.5",
"@types/gulp": "^4.0.13",
"@types/mocha": "^10.0.1",
"@types/node": "^20.5.0",
"@types/proxyquire": "^1.3.28",
"@types/sinon": "^10.0.2",
"@types/sinon-chai": "^3.2.5",
"axios": "^0.25.0",
"chai": "^4.3.4",
"@types/sinon": "^10.0.16",
"@types/sinon-chai": "^3.2.9",
"axios": "^1.4.0",
"chai": "^4.3.7",
"chai-as-promised": "^7.1.1",
"colors": "1.4.0",
"eslint": "^8.6.0",
"eslint": "^8.47.0",
"gulp": "^4.0.2",
"mocha": "^9.0.1",
"mocha": "^10.2.0",
"proxyquire": "^2.1.3",
"sinon": "^13.0.1",
"sinon": "^15.2.0",
"sinon-chai": "^3.7.0"
},
"main": "main.js",
"files": [
"admin/",
"lib/",
"main.js",
"io-package.json",
"LICENSE"
],
"scripts": {

@@ -55,4 +63,8 @@ "test:js": "mocha --opts test/mocha.custom.opts",

"test": "npm run test:js && npm run test:package",
"lint": "eslint",
"release": "release-script",
"lint": "eslint"
"release-patch": "release-script patch --yes --no-update-lockfile",
"release-minor": "release-script minor --yes --no-update-lockfile",
"release-major": "release-script major --yes --no-update-lockfile",
"update-packages": "ncu --upgrade"
},

@@ -59,0 +71,0 @@ "bugs": {

![Logo](admin/accuweather.png)
# ioBroker.accuweather
[![NPM version](http://img.shields.io/npm/v/iobroker.accuweather.svg)](https://www.npmjs.com/package/iobroker.accuweather)
![Number of Installations](http://iobroker.live/badges/accuweather-installed.svg) ![Number of Installations](http://iobroker.live/badges/accuweather-stable.svg) [![NPM version](http://img.shields.io/npm/v/iobroker.accuweather.svg)](https://www.npmjs.com/package/iobroker.accuweather)
[![Downloads](https://img.shields.io/npm/dm/iobroker.accuweather.svg)](https://www.npmjs.com/package/iobroker.accuweather)
[![Dependency Status](https://img.shields.io/david/algar42/iobroker.accuweather.svg)](https://david-dm.org/algar42/iobroker.accuweather)
[![Known Vulnerabilities](https://snyk.io/test/github/algar42/ioBroker.accuweather/badge.svg)](https://snyk.io/test/github/algar42/ioBroker.accuweather)
[![NPM](https://nodei.co/npm/iobroker.accuweather.png?downloads=true)](https://nodei.co/npm/iobroker.accuweather/)
**Tests:**: [![Travis-CI](http://img.shields.io/travis/algar42/ioBroker.accuweather/master.svg)](https://travis-ci.org/algar42/ioBroker.accuweather)
## accuweather adapter for ioBroker

@@ -24,13 +20,13 @@ Weather forecast using AccuWeather API.

To get API Key, register on https://developer.accuweather.com/ and create application in `My Apps` menu.
Once the application created, you will have API key generated.
For free use it is possible to make 50 requests to API per day.
It was noted that to get API working the following settings are preferred (please choose your country!):
Once the application is created, you will have an API key generated.
For free use, it is possible to make 50 requests to API per day.
It was noted that to get the API working, the following settings are preferred (please choose your country!):
![settings](admin/image.png)
### Get Location Key
In order to get location key, go to https://www.accuweather.com/ and enter your city name, or try to enter your coordinates (latitude, longitude) as you have them e.g. in IoBroker settings.
Your location key wil be the number at the end of URL of forecast.
In order to get location key, go to https://www.accuweather.com/ and enter your city name, or try to enter your coordinates (latitude, longitude) as you have them, e.g., in ioBroker settings.
Your location key will be the number at the end of the forecast URL.
### Using in Lovelace visualization (starting version 1.1.0)
Summary channel contains current and by-day forecast with role/types of states supported by type-detector.
The summary channel contains a current and by-day forecast with role/types of states supported by type-detector.
New feature can be used in order to show weather forecast in Lovelace UI.

@@ -45,2 +41,5 @@ For better view a custom lovelace card is created - see https://github.com/algar42/IoB.lovelace.accuweather-card

## Changelog
### 1.3.0 (2023-08-15)
* (isi07) added the Wind Direction Text und Cloud Cover
* (bluefox) Added json config

@@ -60,3 +59,3 @@ ### 1.2.4 (2022-02-08)

### 1.1.7 (2021-06-24)
* (bluefox) Create device for device-detector
* (bluefox) Create device for device-detector

@@ -84,3 +83,3 @@ ### v1.1.6 (2021-05-05)

Copyright (c) 2022 algar42 <igor.aleschenkov@gmail.com>
Copyright (c) 2021-2023 algar42 <igor.aleschenkov@gmail.com>

@@ -87,0 +86,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc