diff --git a/.coveragerc b/.coveragerc index f637b64149000c9b959f56985fe4c25d7f3abe78..64a22ef275ff6bb5f15d1a11be226006b234b780 100644 --- a/.coveragerc +++ b/.coveragerc @@ -73,8 +73,6 @@ omit = homeassistant/components/aurora_abb_powerone/sensor.py homeassistant/components/avea/light.py homeassistant/components/avion/light.py - homeassistant/components/avri/const.py - homeassistant/components/avri/sensor.py homeassistant/components/azure_devops/__init__.py homeassistant/components/azure_devops/const.py homeassistant/components/azure_devops/sensor.py diff --git a/CODEOWNERS b/CODEOWNERS index e5d67234f6f8871d103ef1a42eee13c0ceb7bc58..66c5801e39e51749f41efff919928340b5d038f4 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -54,7 +54,6 @@ homeassistant/components/aurora_abb_powerone/* @davet2001 homeassistant/components/auth/* @home-assistant/core homeassistant/components/automation/* @home-assistant/core homeassistant/components/avea/* @pattyland -homeassistant/components/avri/* @timvancann homeassistant/components/awair/* @ahayworth @danielsjf homeassistant/components/aws/* @awarecan homeassistant/components/axis/* @Kane610 diff --git a/homeassistant/components/avri/.translations/en.json b/homeassistant/components/avri/.translations/en.json deleted file mode 100644 index 83cd4232d429fcf8312f616d314fc89cde42b64c..0000000000000000000000000000000000000000 --- a/homeassistant/components/avri/.translations/en.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "config": { - "abort": { - "already_configured": "This address is already configured." - }, - "error": { - "invalid_country_code": "Unknown 2 letter country code.", - "invalid_house_number": "Invalid house number." - }, - "step": { - "user": { - "data": { - "country_code": "2 Letter country code", - "house_number": "House number", - "house_number_extension": "House number extension", - "zip_code": "Zip code" - }, - "description": "Enter your address", - "title": "Avri" - } - } - }, - "title": "Avri" -} \ No newline at end of file diff --git a/homeassistant/components/avri/.translations/nl.json b/homeassistant/components/avri/.translations/nl.json deleted file mode 100644 index 22798b096893f7c89571c06145ee7a46b342b08e..0000000000000000000000000000000000000000 --- a/homeassistant/components/avri/.translations/nl.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "config": { - "abort": { - "already_configured": "Dit adres is reeds geconfigureerd." - }, - "error": { - "invalid_country_code": "Onbekende landcode", - "invalid_house_number": "Ongeldig huisnummer." - }, - "step": { - "user": { - "data": { - "country_code": "2 Letter landcode", - "house_number": "Huisnummer", - "house_number_extension": "Huisnummer toevoeging", - "zip_code": "Postcode" - }, - "description": "Vul je adres in.", - "title": "Avri" - } - } - }, - "title": "Avri" -} \ No newline at end of file diff --git a/homeassistant/components/avri/__init__.py b/homeassistant/components/avri/__init__.py deleted file mode 100644 index f3b659ddccdabd504d5f7e1d445b60f7bf726055..0000000000000000000000000000000000000000 --- a/homeassistant/components/avri/__init__.py +++ /dev/null @@ -1,60 +0,0 @@ -"""The avri component.""" -import asyncio -from datetime import timedelta - -from avri.api import Avri - -from homeassistant.config_entries import ConfigEntry -from homeassistant.core import HomeAssistant - -from .const import ( - CONF_COUNTRY_CODE, - CONF_HOUSE_NUMBER, - CONF_HOUSE_NUMBER_EXTENSION, - CONF_ZIP_CODE, - DOMAIN, -) - -PLATFORMS = ["sensor"] -SCAN_INTERVAL = timedelta(hours=4) - - -async def async_setup(hass: HomeAssistant, config: dict): - """Set up the Avri component.""" - hass.data[DOMAIN] = {} - return True - - -async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry): - """Set up Avri from a config entry.""" - client = Avri( - postal_code=entry.data[CONF_ZIP_CODE], - house_nr=entry.data[CONF_HOUSE_NUMBER], - house_nr_extension=entry.data.get(CONF_HOUSE_NUMBER_EXTENSION), - country_code=entry.data[CONF_COUNTRY_CODE], - ) - - hass.data[DOMAIN][entry.entry_id] = client - - for component in PLATFORMS: - hass.async_create_task( - hass.config_entries.async_forward_entry_setup(entry, component) - ) - - return True - - -async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry): - """Unload a config entry.""" - unload_ok = all( - await asyncio.gather( - *[ - hass.config_entries.async_forward_entry_unload(entry, component) - for component in PLATFORMS - ] - ) - ) - if unload_ok: - hass.data[DOMAIN].pop(entry.entry_id) - - return unload_ok diff --git a/homeassistant/components/avri/config_flow.py b/homeassistant/components/avri/config_flow.py deleted file mode 100644 index 987b3679b3c3358dd73985465f49d189f44c4e75..0000000000000000000000000000000000000000 --- a/homeassistant/components/avri/config_flow.py +++ /dev/null @@ -1,76 +0,0 @@ -"""Config flow for Avri component.""" -import pycountry -import voluptuous as vol - -from homeassistant import config_entries -from homeassistant.const import CONF_ID - -from .const import ( - CONF_COUNTRY_CODE, - CONF_HOUSE_NUMBER, - CONF_HOUSE_NUMBER_EXTENSION, - CONF_ZIP_CODE, - DEFAULT_COUNTRY_CODE, -) -from .const import DOMAIN # pylint:disable=unused-import - -DATA_SCHEMA = vol.Schema( - { - vol.Required(CONF_ZIP_CODE): str, - vol.Required(CONF_HOUSE_NUMBER): int, - vol.Optional(CONF_HOUSE_NUMBER_EXTENSION): str, - vol.Optional(CONF_COUNTRY_CODE, default=DEFAULT_COUNTRY_CODE): str, - } -) - - -class AvriConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): - """Avri config flow.""" - - VERSION = 1 - - async def _show_setup_form(self, errors=None): - """Show the setup form to the user.""" - return self.async_show_form( - step_id="user", - data_schema=DATA_SCHEMA, - errors=errors or {}, - ) - - async def async_step_user(self, user_input=None): - """Handle the initial step.""" - if user_input is None: - return await self._show_setup_form() - - zip_code = user_input[CONF_ZIP_CODE].replace(" ", "").upper() - - errors = {} - if user_input[CONF_HOUSE_NUMBER] <= 0: - errors[CONF_HOUSE_NUMBER] = "invalid_house_number" - return await self._show_setup_form(errors) - if not pycountry.countries.get(alpha_2=user_input[CONF_COUNTRY_CODE]): - errors[CONF_COUNTRY_CODE] = "invalid_country_code" - return await self._show_setup_form(errors) - - unique_id = ( - f"{zip_code}" - f" " - f"{user_input[CONF_HOUSE_NUMBER]}" - f'{user_input.get(CONF_HOUSE_NUMBER_EXTENSION, "")}' - ) - - await self.async_set_unique_id(unique_id) - self._abort_if_unique_id_configured() - - return self.async_create_entry( - title=unique_id, - data={ - CONF_ID: unique_id, - CONF_ZIP_CODE: zip_code, - CONF_HOUSE_NUMBER: user_input[CONF_HOUSE_NUMBER], - CONF_HOUSE_NUMBER_EXTENSION: user_input.get( - CONF_HOUSE_NUMBER_EXTENSION, "" - ), - CONF_COUNTRY_CODE: user_input[CONF_COUNTRY_CODE], - }, - ) diff --git a/homeassistant/components/avri/const.py b/homeassistant/components/avri/const.py deleted file mode 100644 index dab3491b356fb5d4f1e2c95678d96bdab2f0ddd1..0000000000000000000000000000000000000000 --- a/homeassistant/components/avri/const.py +++ /dev/null @@ -1,8 +0,0 @@ -"""Constants for the Avri integration.""" -CONF_COUNTRY_CODE = "country_code" -CONF_ZIP_CODE = "zip_code" -CONF_HOUSE_NUMBER = "house_number" -CONF_HOUSE_NUMBER_EXTENSION = "house_number_extension" -DOMAIN = "avri" -ICON = "mdi:trash-can-outline" -DEFAULT_COUNTRY_CODE = "NL" diff --git a/homeassistant/components/avri/manifest.json b/homeassistant/components/avri/manifest.json deleted file mode 100644 index 8a418bfb7bd5676175601778ecf868f64ec036af..0000000000000000000000000000000000000000 --- a/homeassistant/components/avri/manifest.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "domain": "avri", - "name": "Avri", - "documentation": "https://www.home-assistant.io/integrations/avri", - "requirements": [ - "avri-api==0.1.7", - "pycountry==19.8.18" - ], - "codeowners": [ - "@timvancann" - ], - "config_flow": true -} \ No newline at end of file diff --git a/homeassistant/components/avri/sensor.py b/homeassistant/components/avri/sensor.py deleted file mode 100644 index 06519a5c455c3e3f5b46582c280500280e2e6bbb..0000000000000000000000000000000000000000 --- a/homeassistant/components/avri/sensor.py +++ /dev/null @@ -1,99 +0,0 @@ -"""Support for Avri waste curbside collection pickup.""" -import logging - -from avri.api import Avri, AvriException - -from homeassistant.config_entries import ConfigEntry -from homeassistant.const import CONF_ID, DEVICE_CLASS_TIMESTAMP -from homeassistant.exceptions import PlatformNotReady -from homeassistant.helpers.entity import Entity -from homeassistant.helpers.typing import HomeAssistantType - -from .const import DOMAIN, ICON - -_LOGGER = logging.getLogger(__name__) - - -async def async_setup_entry( - hass: HomeAssistantType, entry: ConfigEntry, async_add_entities -) -> None: - """Set up the Avri Waste platform.""" - client = hass.data[DOMAIN][entry.entry_id] - integration_id = entry.data[CONF_ID] - - try: - each_upcoming = await hass.async_add_executor_job(client.upcoming_of_each) - except AvriException as ex: - raise PlatformNotReady from ex - else: - entities = [ - AvriWasteUpcoming(client, upcoming.name, integration_id) - for upcoming in each_upcoming - ] - async_add_entities(entities, True) - - -class AvriWasteUpcoming(Entity): - """Avri Waste Sensor.""" - - def __init__(self, client: Avri, waste_type: str, integration_id: str): - """Initialize the sensor.""" - self._waste_type = waste_type - self._name = f"{self._waste_type}".title() - self._state = None - self._client = client - self._state_available = False - self._integration_id = integration_id - - @property - def name(self): - """Return the name of the sensor.""" - return self._name - - @property - def unique_id(self) -> str: - """Return a unique ID.""" - return (f"{self._integration_id}" f"-{self._waste_type}").replace(" ", "") - - @property - def state(self): - """Return the state of the sensor.""" - return self._state - - @property - def available(self): - """Return True if entity is available.""" - return self._state_available - - @property - def device_class(self): - """Return the device class of the sensor.""" - return DEVICE_CLASS_TIMESTAMP - - @property - def icon(self): - """Icon to use in the frontend.""" - return ICON - - async def async_update(self): - """Update the data.""" - if not self.enabled: - return - - try: - pickup_events = self._client.upcoming_of_each() - except AvriException as ex: - _LOGGER.error( - "There was an error retrieving upcoming garbage pickups: %s", ex - ) - self._state_available = False - self._state = None - else: - self._state_available = True - matched_events = list( - filter(lambda event: event.name == self._waste_type, pickup_events) - ) - if not matched_events: - self._state = None - else: - self._state = matched_events[0].day.date() diff --git a/homeassistant/components/avri/strings.json b/homeassistant/components/avri/strings.json deleted file mode 100644 index e00409ffa26694397f4d851e45e62309c5e37be3..0000000000000000000000000000000000000000 --- a/homeassistant/components/avri/strings.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "config": { - "abort": { - "already_configured": "[%key:common::config_flow::abort::already_configured_location%]" - }, - "error": { - "invalid_house_number": "Invalid house number.", - "invalid_country_code": "Unknown 2 letter country code." - }, - "step": { - "user": { - "data": { - "zip_code": "Zip code", - "house_number": "House number", - "house_number_extension": "House number extension", - "country_code": "2 Letter country code" - }, - "description": "Enter your address", - "title": "Avri" - } - } - } -} diff --git a/homeassistant/components/avri/translations/ar.json b/homeassistant/components/avri/translations/ar.json deleted file mode 100644 index b23bf7e8970bb9753855f6d63247aa93b55ae96e..0000000000000000000000000000000000000000 --- a/homeassistant/components/avri/translations/ar.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "config": { - "abort": { - "already_configured": "\u062a\u0645 \u062a\u0643\u0648\u064a\u0646 \u0647\u0630\u0627 \u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0628\u0627\u0644\u0641\u0639\u0644." - } - } -} \ No newline at end of file diff --git a/homeassistant/components/avri/translations/ca.json b/homeassistant/components/avri/translations/ca.json deleted file mode 100644 index 77edbd4990196c139df8e0b05e7604eb1e299d5f..0000000000000000000000000000000000000000 --- a/homeassistant/components/avri/translations/ca.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "config": { - "abort": { - "already_configured": "La ubicaci\u00f3 ja est\u00e0 configurada" - }, - "error": { - "invalid_country_code": "Codi de pa\u00eds desconegut.", - "invalid_house_number": "N\u00famero de casa no v\u00e0lid." - }, - "step": { - "user": { - "data": { - "country_code": "Codi de pa\u00eds de 2 lletres", - "house_number": "N\u00famero de casa", - "house_number_extension": "Ampliaci\u00f3 de n\u00famero de casa", - "zip_code": "Codi postal" - }, - "description": "Introdueix la teva adre\u00e7a", - "title": "Avri" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/avri/translations/cs.json b/homeassistant/components/avri/translations/cs.json deleted file mode 100644 index e46abc942c9ca7a24960cef4b23389d8ece99007..0000000000000000000000000000000000000000 --- a/homeassistant/components/avri/translations/cs.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "config": { - "abort": { - "already_configured": "Um\u00edst\u011bn\u00ed je ji\u017e nastaveno" - }, - "error": { - "invalid_country_code": "Nezn\u00e1m\u00fd dvoup\u00edsmenn\u00fd k\u00f3d zem\u011b.", - "invalid_house_number": "Neplatn\u00e9 \u010d\u00edslo domu." - }, - "step": { - "user": { - "data": { - "country_code": "2p\u00edsmenn\u00fd k\u00f3d zem\u011b", - "house_number": "\u010c\u00edslo domu", - "house_number_extension": "Roz\u0161\u00ed\u0159en\u00ed \u010d\u00edsla domu", - "zip_code": "PS\u010c" - }, - "description": "Zadejte svou adresu", - "title": "Avri" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/avri/translations/de.json b/homeassistant/components/avri/translations/de.json deleted file mode 100644 index fc0ece086a73eaf86b3e938540dedc4d661596c4..0000000000000000000000000000000000000000 --- a/homeassistant/components/avri/translations/de.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "config": { - "abort": { - "already_configured": "Position ist bereits konfiguriert" - }, - "error": { - "invalid_house_number": "Ung\u00fcltige Hausnummer" - }, - "step": { - "user": { - "data": { - "house_number": "Hausnummer", - "zip_code": "Postleitzahl" - }, - "description": "Gibt deine Adresse ein", - "title": "Avri" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/avri/translations/en.json b/homeassistant/components/avri/translations/en.json deleted file mode 100644 index 832849a7060b498917a2e78b6af55620d567ad06..0000000000000000000000000000000000000000 --- a/homeassistant/components/avri/translations/en.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "config": { - "abort": { - "already_configured": "Location is already configured" - }, - "error": { - "invalid_country_code": "Unknown 2 letter country code.", - "invalid_house_number": "Invalid house number." - }, - "step": { - "user": { - "data": { - "country_code": "2 Letter country code", - "house_number": "House number", - "house_number_extension": "House number extension", - "zip_code": "Zip code" - }, - "description": "Enter your address", - "title": "Avri" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/avri/translations/es.json b/homeassistant/components/avri/translations/es.json deleted file mode 100644 index 11539723fab2b3a8bb72c12dcc2cb789da199523..0000000000000000000000000000000000000000 --- a/homeassistant/components/avri/translations/es.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "config": { - "abort": { - "already_configured": "Esta direcci\u00f3n ya est\u00e1 configurada." - }, - "error": { - "invalid_country_code": "C\u00f3digo de pa\u00eds de 2 letras desconocido.", - "invalid_house_number": "N\u00famero de casa no v\u00e1lido." - }, - "step": { - "user": { - "data": { - "country_code": "C\u00f3digo de pa\u00eds de 2 letras", - "house_number": "N\u00famero de casa", - "house_number_extension": "Extensi\u00f3n del n\u00famero de casa", - "zip_code": "C\u00f3digo postal" - }, - "description": "Introduce tu direccion", - "title": "Avri" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/avri/translations/et.json b/homeassistant/components/avri/translations/et.json deleted file mode 100644 index 0e83b8936427882a4149a618f98a211e76c0f6be..0000000000000000000000000000000000000000 --- a/homeassistant/components/avri/translations/et.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "config": { - "abort": { - "already_configured": "Aadress on juba m\u00e4\u00e4ratud" - }, - "error": { - "invalid_country_code": "Tundmatu kahet\u00e4heline riigikood.", - "invalid_house_number": "Tundmatu majanumber." - }, - "step": { - "user": { - "data": { - "country_code": "Kahet\u00e4heline riigikood", - "house_number": "Maja number", - "house_number_extension": "Maja numbri laiendus", - "zip_code": "Postiindeks" - }, - "description": "Sisesta oma aadress", - "title": "" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/avri/translations/fr.json b/homeassistant/components/avri/translations/fr.json deleted file mode 100644 index 188f82beae90eaef3d4873eccf9d1c1425ac93be..0000000000000000000000000000000000000000 --- a/homeassistant/components/avri/translations/fr.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "config": { - "abort": { - "already_configured": "Cette adresse est d\u00e9j\u00e0 configur\u00e9e." - }, - "error": { - "invalid_country_code": "Code pays \u00e0 2 lettres inconnu.", - "invalid_house_number": "Num\u00e9ro de maison invalide." - }, - "step": { - "user": { - "data": { - "country_code": "Code pays \u00e0 2 lettres", - "house_number": "Num\u00e9ro de maison", - "house_number_extension": "Extension de num\u00e9ro de maison", - "zip_code": "Code postal" - }, - "description": "Entrez votre adresse", - "title": "Avri" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/avri/translations/it.json b/homeassistant/components/avri/translations/it.json deleted file mode 100644 index 50c92e0678a85c8695e5a32fe19f8cbc69215d26..0000000000000000000000000000000000000000 --- a/homeassistant/components/avri/translations/it.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "config": { - "abort": { - "already_configured": "La posizione \u00e8 gi\u00e0 configurata" - }, - "error": { - "invalid_country_code": "Codice paese di 2 lettere sconosciuto.", - "invalid_house_number": "Numero civico non valido." - }, - "step": { - "user": { - "data": { - "country_code": "Codice paese di 2 lettere", - "house_number": "Numero civico", - "house_number_extension": "Estensione del numero civico", - "zip_code": "Codice di avviamento postale" - }, - "description": "Inserisci il tuo indirizzo", - "title": "Avri" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/avri/translations/ko.json b/homeassistant/components/avri/translations/ko.json deleted file mode 100644 index ab6504519d45aefdb08b9dd7ddf07faeb93a1494..0000000000000000000000000000000000000000 --- a/homeassistant/components/avri/translations/ko.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "config": { - "abort": { - "already_configured": "\uc774 \uc8fc\uc18c\ub294 \uc774\ubbf8 \uad6c\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4." - }, - "error": { - "invalid_country_code": "\uc54c \uc218 \uc5c6\ub294 \uad6d\uac00\ucf54\ub4dc\uc785\ub2c8\ub2e4.", - "invalid_house_number": "\uc9d1 \ubc88\ud638\uac00 \uc798\ubabb\ub418\uc5c8\uc2b5\ub2c8\ub2e4" - }, - "step": { - "user": { - "data": { - "country_code": "2 \ubb38\uc790 \uad6d\uac00\ucf54\ub4dc", - "house_number": "\uc9d1 \ubc88\ud638", - "house_number_extension": "\uc9d1 \ubc88\ud638 \ucd94\uac00\uc815\ubcf4", - "zip_code": "\uc6b0\ud3b8 \ubc88\ud638" - }, - "description": "\uc8fc\uc18c\ub97c \uc785\ub825\ud574\uc8fc\uc138\uc694", - "title": "Avri" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/avri/translations/lb.json b/homeassistant/components/avri/translations/lb.json deleted file mode 100644 index 657640c2bebccc81deb88e7de3f81c4258875b38..0000000000000000000000000000000000000000 --- a/homeassistant/components/avri/translations/lb.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "config": { - "abort": { - "already_configured": "Standuert ass scho konfigur\u00e9iert." - }, - "error": { - "invalid_country_code": "Onbekannte Zweestellege L\u00e4nner Code", - "invalid_house_number": "Ong\u00eblteg Haus Nummer" - }, - "step": { - "user": { - "data": { - "country_code": "Zweestellege L\u00e4nner Code", - "house_number": "Haus Nummer", - "house_number_extension": "Haus Nummer Extensioun", - "zip_code": "Postleitzuel" - }, - "description": "G\u00ebff deng Adresse un", - "title": "Avri" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/avri/translations/nl.json b/homeassistant/components/avri/translations/nl.json deleted file mode 100644 index a5be62bfc13fcc004fa7b7020865389e3f47fa66..0000000000000000000000000000000000000000 --- a/homeassistant/components/avri/translations/nl.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "config": { - "abort": { - "already_configured": "Locatie is al geconfigureerd" - }, - "error": { - "invalid_country_code": "Onbekende 2-letterige landcode." - } - } -} \ No newline at end of file diff --git a/homeassistant/components/avri/translations/no.json b/homeassistant/components/avri/translations/no.json deleted file mode 100644 index 3f1edaf4c7d85161d36df01b6396198e793bae60..0000000000000000000000000000000000000000 --- a/homeassistant/components/avri/translations/no.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "config": { - "abort": { - "already_configured": "Plasseringen er allerede konfigurert" - }, - "error": { - "invalid_country_code": "Ukjent landskode p\u00e5 2 bokstaver.", - "invalid_house_number": "Ugyldig husnummer." - }, - "step": { - "user": { - "data": { - "country_code": "2 Bokstavs landskode", - "house_number": "Husnummer", - "house_number_extension": "Utvidelse av husnummer", - "zip_code": "Postnummer" - }, - "description": "Skriv inn adressen din", - "title": "" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/avri/translations/pl.json b/homeassistant/components/avri/translations/pl.json deleted file mode 100644 index dfe3f85a38d256e620779f411318b047bf7d2ea6..0000000000000000000000000000000000000000 --- a/homeassistant/components/avri/translations/pl.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "config": { - "abort": { - "already_configured": "Lokalizacja jest ju\u017c skonfigurowana" - }, - "error": { - "invalid_country_code": "Nieznany dwuliterowy kod kraju", - "invalid_house_number": "Nieprawid\u0142owy numer domu" - }, - "step": { - "user": { - "data": { - "country_code": "Dwuliterowy kod kraju", - "house_number": "Numer domu", - "house_number_extension": "Numer mieszkania", - "zip_code": "Kod pocztowy" - }, - "description": "Wpisz sw\u00f3j adres", - "title": "Avri" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/avri/translations/pt.json b/homeassistant/components/avri/translations/pt.json deleted file mode 100644 index 77ddb25fb6e86905132a9b704beabf22dbf19a91..0000000000000000000000000000000000000000 --- a/homeassistant/components/avri/translations/pt.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "config": { - "abort": { - "already_configured": "A localiza\u00e7\u00e3o j\u00e1 est\u00e1 configurada" - }, - "step": { - "user": { - "data": { - "zip_code": "C\u00f3digo postal" - } - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/avri/translations/ru.json b/homeassistant/components/avri/translations/ru.json deleted file mode 100644 index 01003d0e9d0d0cdd5eb46539c537187087883dd6..0000000000000000000000000000000000000000 --- a/homeassistant/components/avri/translations/ru.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "config": { - "abort": { - "already_configured": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0443\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430." - }, - "error": { - "invalid_country_code": "\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0434\u0432\u0443\u0445\u0431\u0443\u043a\u0432\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441\u0442\u0440\u0430\u043d\u044b.", - "invalid_house_number": "\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0434\u043e\u043c\u0430." - }, - "step": { - "user": { - "data": { - "country_code": "\u0414\u0432\u0443\u0445\u0431\u0443\u043a\u0432\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441\u0442\u0440\u0430\u043d\u044b", - "house_number": "\u041d\u043e\u043c\u0435\u0440 \u0434\u043e\u043c\u0430", - "house_number_extension": "\u041b\u0438\u0442\u0435\u0440 \u0434\u043e\u043c\u0430 / \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435", - "zip_code": "\u041f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441" - }, - "description": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 Home Assistant \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 Avri.", - "title": "Avri" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/avri/translations/zh-Hant.json b/homeassistant/components/avri/translations/zh-Hant.json deleted file mode 100644 index 566a9e43dc033b0a6b86f82ea7f373baa06c09c1..0000000000000000000000000000000000000000 --- a/homeassistant/components/avri/translations/zh-Hant.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "config": { - "abort": { - "already_configured": "\u5ea7\u6a19\u5df2\u7d93\u8a2d\u5b9a\u5b8c\u6210" - }, - "error": { - "invalid_country_code": "\u672a\u77e5\u570b\u78bc\uff08\u5169\u5b57\u6bcd\uff09\u3002", - "invalid_house_number": "\u9580\u724c\u865f\u78bc\u932f\u8aa4\u3002" - }, - "step": { - "user": { - "data": { - "country_code": "\u570b\u78bc\uff08\u5169\u5b57\u6bcd\uff09", - "house_number": "\u9580\u724c\u865f\u78bc", - "house_number_extension": "\u9580\u724c\u865f\u78bc\u5206\u865f", - "zip_code": "\u90f5\u905e\u5340\u865f" - }, - "description": "\u8f38\u5165\u5730\u5740", - "title": "Avri" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/generated/config_flows.py b/homeassistant/generated/config_flows.py index 833f11190b6cba7697659e378c3c966a40dc1624..11a0b517646d32bfb96c9cc49b3e0df6d2f7ccdf 100644 --- a/homeassistant/generated/config_flows.py +++ b/homeassistant/generated/config_flows.py @@ -23,7 +23,6 @@ FLOWS = [ "atag", "august", "aurora", - "avri", "awair", "axis", "azure_devops", diff --git a/requirements_all.txt b/requirements_all.txt index 99f972dc590ef4590cc452224ef0aba401973292..ec7b256775c35691653023bd2e530d919ab0ea60 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -305,9 +305,6 @@ av==8.0.2 # homeassistant.components.avion # avion==0.10 -# homeassistant.components.avri -avri-api==0.1.7 - # homeassistant.components.axis axis==41 @@ -1321,9 +1318,6 @@ pycomfoconnect==0.3 # homeassistant.components.coolmaster pycoolmasternet-async==0.1.2 -# homeassistant.components.avri -pycountry==19.8.18 - # homeassistant.components.microsoft pycsspeechtts==1.0.4 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 9385f6956de541ee5f37a0986cb4ab8343c3cdba..6fc1b3da392736f0b63d44792bbb981ad8a955db 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -176,9 +176,6 @@ auroranoaa==0.0.2 # homeassistant.components.stream av==8.0.2 -# homeassistant.components.avri -avri-api==0.1.7 - # homeassistant.components.axis axis==41 @@ -666,9 +663,6 @@ pychromecast==7.6.0 # homeassistant.components.coolmaster pycoolmasternet-async==0.1.2 -# homeassistant.components.avri -pycountry==19.8.18 - # homeassistant.components.daikin pydaikin==2.4.0 diff --git a/tests/components/avri/__init__.py b/tests/components/avri/__init__.py deleted file mode 100644 index c521285503803fd636642bf71afd75a0a30fb777..0000000000000000000000000000000000000000 --- a/tests/components/avri/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Tests for the Avri integration.""" diff --git a/tests/components/avri/test_config_flow.py b/tests/components/avri/test_config_flow.py deleted file mode 100644 index 2dba3c3c11d093afbf1417be0378c49b081c9e3d..0000000000000000000000000000000000000000 --- a/tests/components/avri/test_config_flow.py +++ /dev/null @@ -1,81 +0,0 @@ -"""Test the Avri config flow.""" -from homeassistant import config_entries, setup -from homeassistant.components.avri.const import DOMAIN - -from tests.async_mock import patch - - -async def test_form(hass): - """Test we get the form.""" - await setup.async_setup_component(hass, "avri", {}) - result = await hass.config_entries.flow.async_init( - DOMAIN, context={"source": config_entries.SOURCE_USER} - ) - assert result["type"] == "form" - assert result["errors"] == {} - - with patch( - "homeassistant.components.avri.async_setup_entry", - return_value=True, - ) as mock_setup_entry: - result2 = await hass.config_entries.flow.async_configure( - result["flow_id"], - { - "zip_code": "1234AB", - "house_number": 42, - "house_number_extension": "", - "country_code": "NL", - }, - ) - - assert result2["type"] == "create_entry" - assert result2["title"] == "1234AB 42" - assert result2["data"] == { - "id": "1234AB 42", - "zip_code": "1234AB", - "house_number": 42, - "house_number_extension": "", - "country_code": "NL", - } - await hass.async_block_till_done() - assert len(mock_setup_entry.mock_calls) == 1 - - -async def test_form_invalid_house_number(hass): - """Test we handle invalid house number.""" - result = await hass.config_entries.flow.async_init( - DOMAIN, context={"source": config_entries.SOURCE_USER} - ) - - result2 = await hass.config_entries.flow.async_configure( - result["flow_id"], - { - "zip_code": "1234AB", - "house_number": -1, - "house_number_extension": "", - "country_code": "NL", - }, - ) - - assert result2["type"] == "form" - assert result2["errors"] == {"house_number": "invalid_house_number"} - - -async def test_form_invalid_country_code(hass): - """Test we handle invalid county code.""" - result = await hass.config_entries.flow.async_init( - DOMAIN, context={"source": config_entries.SOURCE_USER} - ) - - result2 = await hass.config_entries.flow.async_configure( - result["flow_id"], - { - "zip_code": "1234AB", - "house_number": 42, - "house_number_extension": "", - "country_code": "foo", - }, - ) - - assert result2["type"] == "form" - assert result2["errors"] == {"country_code": "invalid_country_code"}