diff --git a/custom_components/pollen_lu/__init__.py b/custom_components/pollen_lu/__init__.py index 935ccd2..ebf1388 100644 --- a/custom_components/pollen_lu/__init__.py +++ b/custom_components/pollen_lu/__init__.py @@ -2,13 +2,14 @@ from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.const import CONF_SCAN_INTERVAL from homeassistant.core import ServiceCall, SupportsResponse +from homeassistant.helpers import config_validation as cv from datetime import timedelta, datetime import logging from .const import DOMAIN, API_URL -_LOGGER = logging.getLogger(__name__) +CONFIG_SCHEMA = cv.config_entry_only_config_schema(DOMAIN) async def async_setup(hass, config: dict) -> bool: """Set up the integration.""" diff --git a/custom_components/pollen_lu/manifest.json b/custom_components/pollen_lu/manifest.json index c8f51aa..d1809dd 100644 --- a/custom_components/pollen_lu/manifest.json +++ b/custom_components/pollen_lu/manifest.json @@ -8,7 +8,7 @@ "codeowners": ["@Foxi352"], "requirements": [], "iot_class": "cloud_polling", - "translations": ["en", "de", "fr"], + "translations": true, "config_flow": true, "integration_type": "service", "after_dependencies": ["http", "network"] diff --git a/custom_components/pollen_lu/strings.json b/custom_components/pollen_lu/strings.json index 9b9ca0b..533ad53 100644 --- a/custom_components/pollen_lu/strings.json +++ b/custom_components/pollen_lu/strings.json @@ -26,6 +26,7 @@ }, "services": { "force_poll": { + "name": "Force poll the API", "description": "Force poll the Pollen.lu API immediately.", "fields": { "none": { diff --git a/custom_components/pollen_lu/translations/de.json b/custom_components/pollen_lu/translations/de.json index 7c4be73..ea3e7f2 100644 --- a/custom_components/pollen_lu/translations/de.json +++ b/custom_components/pollen_lu/translations/de.json @@ -26,6 +26,7 @@ }, "services": { "force_poll": { + "name": "Sofortiges Abrufen der API", "description": "Sofortiges Abrufen der Pollen.lu API erzwingen.", "fields": { "none": { diff --git a/custom_components/pollen_lu/translations/en.json b/custom_components/pollen_lu/translations/en.json index 9b9ca0b..533ad53 100644 --- a/custom_components/pollen_lu/translations/en.json +++ b/custom_components/pollen_lu/translations/en.json @@ -26,6 +26,7 @@ }, "services": { "force_poll": { + "name": "Force poll the API", "description": "Force poll the Pollen.lu API immediately.", "fields": { "none": { diff --git a/custom_components/pollen_lu/translations/fr.json b/custom_components/pollen_lu/translations/fr.json index 33f9ee8..39390cb 100644 --- a/custom_components/pollen_lu/translations/fr.json +++ b/custom_components/pollen_lu/translations/fr.json @@ -26,6 +26,7 @@ }, "services": { "force_poll": { + "name": "Forcer l'interrogation de l'API", "description": "Forcer l'interrogation de l'API Pollen.lu immédiatement.", "fields": { "none": {