{#
/**
* Copyright (C) 2023 Xibo Signage Ltd
*
* Xibo - Digital Signage - http://www.xibo.org.uk
*
* This file is part of Xibo.
*
* Xibo is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* Xibo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Xibo. If not, see
Weather forecasts, nowcasts and history in a fast and elegant way
Weather data provided by OpenWeather is provided under CC-BY-SA 4.0 and ODbl.
{% if interface.isProviderSetting("owmApiKey") %}{{ "Your platform provider has configured this connector for you."|trans }}
{% else %} {% set title %} Open Weather Map have added a new "One Call API 3.0" option to their suite of products. Unfortunately a credit card is required to activate this service. Older API keys are not compatible with the new API and therefore users will need to choose which API version is required for their key below. {% endset %} {{ forms.alert(title, "info") }} {% set title %}{% trans "Open Weather Map API Key" %}{% endset %} {% set helpText %}{% trans "Enter your API Key from Open Weather Map." %}{% endset %} {{ forms.input("owmApiKey", title, interface.getSetting("owmApiKey"), helpText) }} {% set title %}{% trans "Paid plan?" %}{% endset %} {% set helpText %}{% trans "Is the above key on an Open Weather Map paid plan? Do NOT tick this if you have subscribed to One Call API 3.0." %}{% endset %} {{ forms.checkbox("owmIsPaidPlan", title, interface.getSetting("owmIsPaidPlan"), helpText) }} {% set title %}{% trans "Open Weather Map Version" %}{% endset %} {% set helpText %}{% trans "Which version of the Open Weather Map did you choose? If you created your account recently it will be 3.0." %}{% endset %} {% set options = [ { id: "2.5", value: "2.5" }, { id: "3.0", value: "3.0" }, ] %} {{ forms.dropdown("owmApiVersion", "single", title, interface.getSetting("owmApiVersion", "2.5"), options, "id", "value", helpText) }} {% set title %}{% trans "Cache Period" %}{% endset %} {% set helpText %}{% trans "This module uses 3rd party data. Please enter the number of seconds you would like to cache results." %}{% endset %} {{ forms.input("cachePeriod", title, interface.getSetting("cachePeriod", 3600), helpText) }} {% endif %} {% endblock %}