From a136cf7086334fc53e47ebce42f8a8e4b5ca8a50 Mon Sep 17 00:00:00 2001 From: Baptiste Candellier Date: Sun, 20 Mar 2022 19:00:16 +0100 Subject: [PATCH] Remove SmartHab integration (#67874) --- .coveragerc | 3 - CODEOWNERS | 2 - homeassistant/components/smarthab/__init__.py | 85 ------------ .../components/smarthab/config_flow.py | 78 ----------- homeassistant/components/smarthab/cover.py | 100 -------------- homeassistant/components/smarthab/light.py | 74 ---------- .../components/smarthab/manifest.json | 10 -- .../components/smarthab/strings.json | 19 --- .../components/smarthab/translations/bg.json | 12 -- .../components/smarthab/translations/ca.json | 19 --- .../components/smarthab/translations/cs.json | 17 --- .../components/smarthab/translations/de.json | 19 --- .../components/smarthab/translations/el.json | 19 --- .../components/smarthab/translations/en.json | 19 --- .../components/smarthab/translations/es.json | 19 --- .../components/smarthab/translations/et.json | 19 --- .../components/smarthab/translations/fr.json | 19 --- .../components/smarthab/translations/he.json | 16 --- .../components/smarthab/translations/hu.json | 19 --- .../components/smarthab/translations/id.json | 19 --- .../components/smarthab/translations/it.json | 19 --- .../components/smarthab/translations/ja.json | 19 --- .../components/smarthab/translations/ko.json | 19 --- .../components/smarthab/translations/lb.json | 19 --- .../components/smarthab/translations/nl.json | 19 --- .../components/smarthab/translations/no.json | 19 --- .../components/smarthab/translations/pl.json | 19 --- .../smarthab/translations/pt-BR.json | 19 --- .../components/smarthab/translations/pt.json | 16 --- .../components/smarthab/translations/ru.json | 19 --- .../components/smarthab/translations/sk.json | 14 -- .../components/smarthab/translations/tr.json | 19 --- .../components/smarthab/translations/uk.json | 19 --- .../smarthab/translations/zh-Hans.json | 7 - .../smarthab/translations/zh-Hant.json | 19 --- homeassistant/generated/config_flows.py | 1 - requirements_all.txt | 3 - requirements_test_all.txt | 3 - tests/components/smarthab/__init__.py | 1 - tests/components/smarthab/test_config_flow.py | 126 ------------------ 40 files changed, 986 deletions(-) delete mode 100644 homeassistant/components/smarthab/__init__.py delete mode 100644 homeassistant/components/smarthab/config_flow.py delete mode 100644 homeassistant/components/smarthab/cover.py delete mode 100644 homeassistant/components/smarthab/light.py delete mode 100644 homeassistant/components/smarthab/manifest.json delete mode 100644 homeassistant/components/smarthab/strings.json delete mode 100644 homeassistant/components/smarthab/translations/bg.json delete mode 100644 homeassistant/components/smarthab/translations/ca.json delete mode 100644 homeassistant/components/smarthab/translations/cs.json delete mode 100644 homeassistant/components/smarthab/translations/de.json delete mode 100644 homeassistant/components/smarthab/translations/el.json delete mode 100644 homeassistant/components/smarthab/translations/en.json delete mode 100644 homeassistant/components/smarthab/translations/es.json delete mode 100644 homeassistant/components/smarthab/translations/et.json delete mode 100644 homeassistant/components/smarthab/translations/fr.json delete mode 100644 homeassistant/components/smarthab/translations/he.json delete mode 100644 homeassistant/components/smarthab/translations/hu.json delete mode 100644 homeassistant/components/smarthab/translations/id.json delete mode 100644 homeassistant/components/smarthab/translations/it.json delete mode 100644 homeassistant/components/smarthab/translations/ja.json delete mode 100644 homeassistant/components/smarthab/translations/ko.json delete mode 100644 homeassistant/components/smarthab/translations/lb.json delete mode 100644 homeassistant/components/smarthab/translations/nl.json delete mode 100644 homeassistant/components/smarthab/translations/no.json delete mode 100644 homeassistant/components/smarthab/translations/pl.json delete mode 100644 homeassistant/components/smarthab/translations/pt-BR.json delete mode 100644 homeassistant/components/smarthab/translations/pt.json delete mode 100644 homeassistant/components/smarthab/translations/ru.json delete mode 100644 homeassistant/components/smarthab/translations/sk.json delete mode 100644 homeassistant/components/smarthab/translations/tr.json delete mode 100644 homeassistant/components/smarthab/translations/uk.json delete mode 100644 homeassistant/components/smarthab/translations/zh-Hans.json delete mode 100644 homeassistant/components/smarthab/translations/zh-Hant.json delete mode 100644 tests/components/smarthab/__init__.py delete mode 100644 tests/components/smarthab/test_config_flow.py diff --git a/.coveragerc b/.coveragerc index e5619ac4d67..47b07724421 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1061,9 +1061,6 @@ omit = homeassistant/components/smappee/sensor.py homeassistant/components/smappee/switch.py homeassistant/components/smarty/* - homeassistant/components/smarthab/__init__.py - homeassistant/components/smarthab/cover.py - homeassistant/components/smarthab/light.py homeassistant/components/sms/__init__.py homeassistant/components/sms/const.py homeassistant/components/sms/gateway.py diff --git a/CODEOWNERS b/CODEOWNERS index 1a7c960730b..d013572790f 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -908,8 +908,6 @@ homeassistant/components/smappee/* @bsmappee tests/components/smappee/* @bsmappee homeassistant/components/smart_meter_texas/* @grahamwetzler tests/components/smart_meter_texas/* @grahamwetzler -homeassistant/components/smarthab/* @outadoc -tests/components/smarthab/* @outadoc homeassistant/components/smartthings/* @andrewsayre tests/components/smartthings/* @andrewsayre homeassistant/components/smarttub/* @mdz diff --git a/homeassistant/components/smarthab/__init__.py b/homeassistant/components/smarthab/__init__.py deleted file mode 100644 index a4dc1a43f31..00000000000 --- a/homeassistant/components/smarthab/__init__.py +++ /dev/null @@ -1,85 +0,0 @@ -"""Support for SmartHab device integration.""" -import logging - -import pysmarthab -import voluptuous as vol - -from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry -from homeassistant.const import CONF_EMAIL, CONF_PASSWORD, Platform -from homeassistant.core import HomeAssistant -from homeassistant.exceptions import ConfigEntryNotReady -import homeassistant.helpers.config_validation as cv -from homeassistant.helpers.typing import ConfigType - -DOMAIN = "smarthab" -DATA_HUB = "hub" -PLATFORMS = [Platform.LIGHT, Platform.COVER] - -_LOGGER = logging.getLogger(__name__) - -CONFIG_SCHEMA = vol.Schema( - vol.All( - cv.deprecated(DOMAIN), - { - DOMAIN: vol.Schema( - { - vol.Required(CONF_EMAIL): cv.string, - vol.Required(CONF_PASSWORD): cv.string, - } - ) - }, - ), - extra=vol.ALLOW_EXTRA, -) - - -async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: - """Set up the SmartHab platform.""" - - hass.data.setdefault(DOMAIN, {}) - - if DOMAIN not in config: - return True - - if not hass.config_entries.async_entries(DOMAIN): - hass.async_create_task( - hass.config_entries.flow.async_init( - DOMAIN, - context={"source": SOURCE_IMPORT}, - data=config[DOMAIN], - ) - ) - - return True - - -async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: - """Set up config entry for SmartHab integration.""" - - # Assign configuration variables - username = entry.data[CONF_EMAIL] - password = entry.data[CONF_PASSWORD] - - # Setup connection with SmartHab API - hub = pysmarthab.SmartHab() - - try: - await hub.async_login(username, password) - except pysmarthab.RequestFailedException as err: - _LOGGER.exception("Error while trying to reach SmartHab API") - raise ConfigEntryNotReady from err - - # Pass hub object to child platforms - hass.data[DOMAIN][entry.entry_id] = {DATA_HUB: hub} - - hass.config_entries.async_setup_platforms(entry, PLATFORMS) - - return True - - -async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: - """Unload config entry from SmartHab integration.""" - unload_ok = await hass.config_entries.async_unload_platforms(entry, PLATFORMS) - if unload_ok: - hass.data[DOMAIN].pop(entry.entry_id) - return unload_ok diff --git a/homeassistant/components/smarthab/config_flow.py b/homeassistant/components/smarthab/config_flow.py deleted file mode 100644 index 826454ab4d8..00000000000 --- a/homeassistant/components/smarthab/config_flow.py +++ /dev/null @@ -1,78 +0,0 @@ -"""SmartHab configuration flow.""" -import logging - -import pysmarthab -import voluptuous as vol - -from homeassistant import config_entries -from homeassistant.const import CONF_EMAIL, CONF_PASSWORD - -from . import DOMAIN - -_LOGGER = logging.getLogger(__name__) - - -class SmartHabConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): - """SmartHab config flow.""" - - VERSION = 1 - - def _show_setup_form(self, user_input=None, errors=None): - """Show the setup form to the user.""" - - if user_input is None: - user_input = {} - - return self.async_show_form( - step_id="user", - data_schema=vol.Schema( - { - vol.Required( - CONF_EMAIL, default=user_input.get(CONF_EMAIL, "") - ): str, - vol.Required(CONF_PASSWORD): str, - } - ), - errors=errors or {}, - ) - - async def async_step_user(self, user_input=None): - """Handle a flow initiated by the user.""" - errors = {} - - if user_input is None: - return self._show_setup_form(user_input, None) - - username = user_input[CONF_EMAIL] - password = user_input[CONF_PASSWORD] - - # Check if already configured - if self.unique_id is None: - await self.async_set_unique_id(username) - self._abort_if_unique_id_configured() - - # Setup connection with SmartHab API - hub = pysmarthab.SmartHab() - - try: - await hub.async_login(username, password) - - # Verify that passed in configuration works - if hub.is_logged_in(): - return self.async_create_entry( - title=username, data={CONF_EMAIL: username, CONF_PASSWORD: password} - ) - - errors["base"] = "invalid_auth" - except pysmarthab.RequestFailedException: - _LOGGER.exception("Error while trying to reach SmartHab API") - errors["base"] = "service" - except Exception: # pylint: disable=broad-except - _LOGGER.exception("Unexpected error during login") - errors["base"] = "unknown" - - return self._show_setup_form(user_input, errors) - - async def async_step_import(self, import_info): - """Handle import from legacy config.""" - return await self.async_step_user(import_info) diff --git a/homeassistant/components/smarthab/cover.py b/homeassistant/components/smarthab/cover.py deleted file mode 100644 index 3c581774b03..00000000000 --- a/homeassistant/components/smarthab/cover.py +++ /dev/null @@ -1,100 +0,0 @@ -"""Support for SmartHab device integration.""" -from datetime import timedelta -import logging - -import pysmarthab -from requests.exceptions import Timeout - -from homeassistant.components.cover import ( - ATTR_POSITION, - SUPPORT_CLOSE, - SUPPORT_OPEN, - SUPPORT_SET_POSITION, - CoverDeviceClass, - CoverEntity, -) -from homeassistant.config_entries import ConfigEntry -from homeassistant.core import HomeAssistant -from homeassistant.helpers.entity_platform import AddEntitiesCallback - -from . import DATA_HUB, DOMAIN - -_LOGGER = logging.getLogger(__name__) - -SCAN_INTERVAL = timedelta(seconds=60) - - -async def async_setup_entry( - hass: HomeAssistant, - config_entry: ConfigEntry, - async_add_entities: AddEntitiesCallback, -) -> None: - """Set up SmartHab covers from a config entry.""" - hub = hass.data[DOMAIN][config_entry.entry_id][DATA_HUB] - - entities = ( - SmartHabCover(cover) - for cover in await hub.async_get_device_list() - if isinstance(cover, pysmarthab.Shutter) - ) - - async_add_entities(entities, True) - - -class SmartHabCover(CoverEntity): - """Representation a cover.""" - - _attr_device_class = CoverDeviceClass.WINDOW - - def __init__(self, cover): - """Initialize a SmartHabCover.""" - self._cover = cover - - @property - def unique_id(self) -> str: - """Return a unique ID.""" - return self._cover.device_id - - @property - def name(self) -> str: - """Return the display name of this cover.""" - return self._cover.label - - @property - def current_cover_position(self) -> int: - """Return current position of cover. - - None is unknown, 0 is closed, 100 is fully open. - """ - return self._cover.state - - @property - def supported_features(self) -> int: - """Flag supported features.""" - return SUPPORT_OPEN | SUPPORT_CLOSE | SUPPORT_SET_POSITION - - @property - def is_closed(self) -> bool: - """Return if the cover is closed or not.""" - return self._cover.state == 0 - - async def async_open_cover(self, **kwargs): - """Open the cover.""" - await self._cover.async_open() - - async def async_close_cover(self, **kwargs): - """Close cover.""" - await self._cover.async_close() - - async def async_set_cover_position(self, **kwargs): - """Move the cover to a specific position.""" - await self._cover.async_set_state(kwargs[ATTR_POSITION]) - - async def async_update(self): - """Fetch new state data for this cover.""" - try: - await self._cover.async_update() - except Timeout: - _LOGGER.error( - "Reached timeout while updating cover %s from API", self.entity_id - ) diff --git a/homeassistant/components/smarthab/light.py b/homeassistant/components/smarthab/light.py deleted file mode 100644 index 9fcc952b24a..00000000000 --- a/homeassistant/components/smarthab/light.py +++ /dev/null @@ -1,74 +0,0 @@ -"""Support for SmartHab device integration.""" -from datetime import timedelta -import logging - -import pysmarthab -from requests.exceptions import Timeout - -from homeassistant.components.light import LightEntity -from homeassistant.config_entries import ConfigEntry -from homeassistant.core import HomeAssistant -from homeassistant.helpers.entity_platform import AddEntitiesCallback - -from . import DATA_HUB, DOMAIN - -_LOGGER = logging.getLogger(__name__) - -SCAN_INTERVAL = timedelta(seconds=60) - - -async def async_setup_entry( - hass: HomeAssistant, - config_entry: ConfigEntry, - async_add_entities: AddEntitiesCallback, -) -> None: - """Set up SmartHab lights from a config entry.""" - hub = hass.data[DOMAIN][config_entry.entry_id][DATA_HUB] - - entities = ( - SmartHabLight(light) - for light in await hub.async_get_device_list() - if isinstance(light, pysmarthab.Light) - ) - - async_add_entities(entities, True) - - -class SmartHabLight(LightEntity): - """Representation of a SmartHab Light.""" - - def __init__(self, light): - """Initialize a SmartHabLight.""" - self._light = light - - @property - def unique_id(self) -> str: - """Return a unique ID.""" - return self._light.device_id - - @property - def name(self) -> str: - """Return the display name of this light.""" - return self._light.label - - @property - def is_on(self) -> bool: - """Return true if light is on.""" - return self._light.state - - async def async_turn_on(self, **kwargs): - """Instruct the light to turn on.""" - await self._light.async_turn_on() - - async def async_turn_off(self, **kwargs): - """Instruct the light to turn off.""" - await self._light.async_turn_off() - - async def async_update(self): - """Fetch new state data for this light.""" - try: - await self._light.async_update() - except Timeout: - _LOGGER.error( - "Reached timeout while updating light %s from API", self.entity_id - ) diff --git a/homeassistant/components/smarthab/manifest.json b/homeassistant/components/smarthab/manifest.json deleted file mode 100644 index 7974215de64..00000000000 --- a/homeassistant/components/smarthab/manifest.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "domain": "smarthab", - "name": "SmartHab", - "documentation": "https://www.home-assistant.io/integrations/smarthab", - "config_flow": true, - "requirements": ["smarthab==0.21"], - "codeowners": ["@outadoc"], - "iot_class": "cloud_polling", - "loggers": ["pysmarthab"] -} diff --git a/homeassistant/components/smarthab/strings.json b/homeassistant/components/smarthab/strings.json deleted file mode 100644 index e1cb6eb4411..00000000000 --- a/homeassistant/components/smarthab/strings.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "config": { - "error": { - "service": "Error while trying to reach SmartHab. Service might be down. Check your connection.", - "invalid_auth": "[%key:common::config_flow::error::invalid_auth%]", - "unknown": "[%key:common::config_flow::error::unknown%]" - }, - "step": { - "user": { - "data": { - "password": "[%key:common::config_flow::data::password%]", - "email": "[%key:common::config_flow::data::email%]" - }, - "description": "For technical reasons, be sure to use a secondary account specific to your Home Assistant setup. You can create one from the SmartHab application.", - "title": "Setup SmartHab" - } - } - } -} diff --git a/homeassistant/components/smarthab/translations/bg.json b/homeassistant/components/smarthab/translations/bg.json deleted file mode 100644 index 75022ed3005..00000000000 --- a/homeassistant/components/smarthab/translations/bg.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "config": { - "step": { - "user": { - "data": { - "email": "Email", - "password": "\u041f\u0430\u0440\u043e\u043b\u0430" - } - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/smarthab/translations/ca.json b/homeassistant/components/smarthab/translations/ca.json deleted file mode 100644 index cac81a0acea..00000000000 --- a/homeassistant/components/smarthab/translations/ca.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "config": { - "error": { - "invalid_auth": "Autenticaci\u00f3 inv\u00e0lida", - "service": "Error en l'intent de connexi\u00f3 a SmartHab. Pot ser que el servei no estigui disponible. Comprova la connexi\u00f3.", - "unknown": "Error inesperat" - }, - "step": { - "user": { - "data": { - "email": "Correu electr\u00f2nic", - "password": "Contrasenya" - }, - "description": "Per motius t\u00e8cnics, assegura't utilitzar un compte secundari espec\u00edfic per a la configuraci\u00f3 de Home Assistant. Pots crear-ne un des de l'aplicaci\u00f3 SmartHab.", - "title": "Configuraci\u00f3 de SmartHab" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/smarthab/translations/cs.json b/homeassistant/components/smarthab/translations/cs.json deleted file mode 100644 index 1e862ff0069..00000000000 --- a/homeassistant/components/smarthab/translations/cs.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "config": { - "error": { - "invalid_auth": "Neplatn\u00e9 ov\u011b\u0159en\u00ed", - "unknown": "Neo\u010dek\u00e1van\u00e1 chyba" - }, - "step": { - "user": { - "data": { - "email": "E-mail", - "password": "Heslo" - }, - "title": "Nastaven\u00ed SmartHab" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/smarthab/translations/de.json b/homeassistant/components/smarthab/translations/de.json deleted file mode 100644 index ca2bf3373f2..00000000000 --- a/homeassistant/components/smarthab/translations/de.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "config": { - "error": { - "invalid_auth": "Ung\u00fcltige Authentifizierung", - "service": "Fehler beim Versuch, SmartHab zu erreichen. Der Dienst ist m\u00f6glicherweise nicht erreichbar. Pr\u00fcfe deine Verbindung.", - "unknown": "Unerwarteter Fehler" - }, - "step": { - "user": { - "data": { - "email": "E-Mail", - "password": "Passwort" - }, - "description": "Stelle aus technischen Gr\u00fcnden sicher, dass du ein sekund\u00e4res Konto speziell f\u00fcr deine Home Assistant-Einrichtung verwendest. Du kannst ein solches Konto \u00fcber die SmartHab-Anwendung erstellen.", - "title": "SmartHab einrichten" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/smarthab/translations/el.json b/homeassistant/components/smarthab/translations/el.json deleted file mode 100644 index 43de6c1ca89..00000000000 --- a/homeassistant/components/smarthab/translations/el.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "config": { - "error": { - "invalid_auth": "\u039c\u03b7 \u03ad\u03b3\u03ba\u03c5\u03c1\u03bf\u03c2 \u03ad\u03bb\u03b5\u03b3\u03c7\u03bf\u03c2 \u03c4\u03b1\u03c5\u03c4\u03cc\u03c4\u03b7\u03c4\u03b1\u03c2", - "service": "\u03a3\u03c6\u03ac\u03bb\u03bc\u03b1 \u03ba\u03b1\u03c4\u03ac \u03c4\u03b7\u03bd \u03c0\u03c1\u03bf\u03c3\u03c0\u03ac\u03b8\u03b5\u03b9\u03b1 \u03c0\u03c1\u03cc\u03c3\u03b2\u03b1\u03c3\u03b7\u03c2 \u03c3\u03c4\u03bf SmartHab. \u0397 \u03c5\u03c0\u03b7\u03c1\u03b5\u03c3\u03af\u03b1 \u03bc\u03c0\u03bf\u03c1\u03b5\u03af \u03bd\u03b1 \u03b5\u03af\u03bd\u03b1\u03b9 \u03b5\u03ba\u03c4\u03cc\u03c2 \u03bb\u03b5\u03b9\u03c4\u03bf\u03c5\u03c1\u03b3\u03af\u03b1\u03c2. \u0395\u03bb\u03ad\u03b3\u03be\u03c4\u03b5 \u03c4\u03b7 \u03c3\u03cd\u03bd\u03b4\u03b5\u03c3\u03ae \u03c3\u03b1\u03c2.", - "unknown": "\u0391\u03c0\u03c1\u03cc\u03c3\u03bc\u03b5\u03bd\u03bf \u03c3\u03c6\u03ac\u03bb\u03bc\u03b1" - }, - "step": { - "user": { - "data": { - "email": "Email", - "password": "\u039a\u03c9\u03b4\u03b9\u03ba\u03cc\u03c2 \u03c0\u03c1\u03cc\u03c3\u03b2\u03b1\u03c3\u03b7\u03c2" - }, - "description": "\u0393\u03b9\u03b1 \u03c4\u03b5\u03c7\u03bd\u03b9\u03ba\u03bf\u03cd\u03c2 \u03bb\u03cc\u03b3\u03bf\u03c5\u03c2, \u03b2\u03b5\u03b2\u03b1\u03b9\u03c9\u03b8\u03b5\u03af\u03c4\u03b5 \u03cc\u03c4\u03b9 \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03b5\u03af\u03c4\u03b5 \u03ad\u03bd\u03b1\u03bd \u03b4\u03b5\u03c5\u03c4\u03b5\u03c1\u03b5\u03cd\u03bf\u03bd\u03c4\u03b1 \u03bb\u03bf\u03b3\u03b1\u03c1\u03b9\u03b1\u03c3\u03bc\u03cc \u03b5\u03b9\u03b4\u03b9\u03ba\u03ac \u03b3\u03b9\u03b1 \u03c4\u03b7 \u03c1\u03cd\u03b8\u03bc\u03b9\u03c3\u03b7 \u03c4\u03bf\u03c5 Home Assistant. \u039c\u03c0\u03bf\u03c1\u03b5\u03af\u03c4\u03b5 \u03bd\u03b1 \u03b4\u03b7\u03bc\u03b9\u03bf\u03c5\u03c1\u03b3\u03ae\u03c3\u03b5\u03c4\u03b5 \u03ad\u03bd\u03b1\u03bd \u03b1\u03c0\u03cc \u03c4\u03b7\u03bd \u03b5\u03c6\u03b1\u03c1\u03bc\u03bf\u03b3\u03ae SmartHab.", - "title": "\u03a1\u03cd\u03b8\u03bc\u03b9\u03c3\u03b7 SmartHab" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/smarthab/translations/en.json b/homeassistant/components/smarthab/translations/en.json deleted file mode 100644 index 854f7a7ddb5..00000000000 --- a/homeassistant/components/smarthab/translations/en.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "config": { - "error": { - "invalid_auth": "Invalid authentication", - "service": "Error while trying to reach SmartHab. Service might be down. Check your connection.", - "unknown": "Unexpected error" - }, - "step": { - "user": { - "data": { - "email": "Email", - "password": "Password" - }, - "description": "For technical reasons, be sure to use a secondary account specific to your Home Assistant setup. You can create one from the SmartHab application.", - "title": "Setup SmartHab" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/smarthab/translations/es.json b/homeassistant/components/smarthab/translations/es.json deleted file mode 100644 index b111ddbccd1..00000000000 --- a/homeassistant/components/smarthab/translations/es.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "config": { - "error": { - "invalid_auth": "Autenticaci\u00f3n no v\u00e1lida", - "service": "Error al intentar contactar con SmartHab. El servicio podr\u00eda estar ca\u00eddo. Verifica tu conexi\u00f3n.", - "unknown": "Error inesperado" - }, - "step": { - "user": { - "data": { - "email": "Correo electr\u00f3nico", - "password": "Contrase\u00f1a" - }, - "description": "Por razones t\u00e9cnicas, aseg\u00farate de usar una cuenta secundaria espec\u00edfica para su configuraci\u00f3n de Home Assistant. Puedes crear una desde la aplicaci\u00f3n SmartHab.", - "title": "Configurar SmartHab" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/smarthab/translations/et.json b/homeassistant/components/smarthab/translations/et.json deleted file mode 100644 index f7c91f8dce6..00000000000 --- a/homeassistant/components/smarthab/translations/et.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "config": { - "error": { - "invalid_auth": "Tuvastamise viga", - "service": "Viga SmartHabiga \u00fchendumisel. Teenus v\u00f5ib olla h\u00e4iritud. Kontrolli oma \u00fchendust.", - "unknown": "Tundmatu viga" - }, - "step": { - "user": { - "data": { - "email": "E-post", - "password": "Salas\u00f5na" - }, - "description": "Tehnilistel p\u00f5hjustel kasuta kindlasti oma Home Assistanti seadistustele vastavat sekundaarset kontot. Selle saad luua rakendusest SmartHab.", - "title": "Seadista SmartHab" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/smarthab/translations/fr.json b/homeassistant/components/smarthab/translations/fr.json deleted file mode 100644 index 5e3381a50e6..00000000000 --- a/homeassistant/components/smarthab/translations/fr.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "config": { - "error": { - "invalid_auth": "Authentification non valide", - "service": "Erreur de connexion \u00e0 SmartHab. V\u00e9rifiez votre connexion. Le service peut \u00eatre indisponible.", - "unknown": "Erreur inattendue" - }, - "step": { - "user": { - "data": { - "email": "Courriel", - "password": "Mot de passe" - }, - "description": "Pour des raisons techniques, utilisez un compte sp\u00e9cifique \u00e0 Home Assistant. Vous pouvez cr\u00e9er un compte secondaire depuis l'application SmartHab.", - "title": "Configurer SmartHab" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/smarthab/translations/he.json b/homeassistant/components/smarthab/translations/he.json deleted file mode 100644 index c00515506ac..00000000000 --- a/homeassistant/components/smarthab/translations/he.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "config": { - "error": { - "invalid_auth": "\u05d0\u05d9\u05de\u05d5\u05ea \u05dc\u05d0 \u05d7\u05d5\u05e7\u05d9", - "unknown": "\u05e9\u05d2\u05d9\u05d0\u05d4 \u05d1\u05dc\u05ea\u05d9 \u05e6\u05e4\u05d5\u05d9\u05d4" - }, - "step": { - "user": { - "data": { - "email": "\u05d3\u05d5\u05d0\"\u05dc", - "password": "\u05e1\u05d9\u05e1\u05de\u05d4" - } - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/smarthab/translations/hu.json b/homeassistant/components/smarthab/translations/hu.json deleted file mode 100644 index 2e3cf430a9f..00000000000 --- a/homeassistant/components/smarthab/translations/hu.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "config": { - "error": { - "invalid_auth": "\u00c9rv\u00e9nytelen hiteles\u00edt\u00e9s", - "service": "Hiba t\u00f6rt\u00e9nt a SmartHab el\u00e9r\u00e9se k\u00f6zben. A szolg\u00e1ltat\u00e1s le\u00e1llhat. Ellen\u0151rizze a kapcsolatot.", - "unknown": "V\u00e1ratlan hiba t\u00f6rt\u00e9nt" - }, - "step": { - "user": { - "data": { - "email": "E-mail", - "password": "Jelsz\u00f3" - }, - "description": "Technikai okokb\u00f3l ne felejtsen el m\u00e1sodlagos fi\u00f3kot haszn\u00e1lni a Home Assistant be\u00e1ll\u00edt\u00e1s\u00e1hoz. A SmartHab alkalmaz\u00e1sb\u00f3l l\u00e9trehozhat egyet.", - "title": "A SmartHab be\u00e1ll\u00edt\u00e1sa" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/smarthab/translations/id.json b/homeassistant/components/smarthab/translations/id.json deleted file mode 100644 index 7a776eac304..00000000000 --- a/homeassistant/components/smarthab/translations/id.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "config": { - "error": { - "invalid_auth": "Autentikasi tidak valid", - "service": "Terjadi kesalahan saat mencoba menjangkau SmartHab. Layanan mungkin sedang mengalami gangguan. Periksa koneksi Anda.", - "unknown": "Kesalahan yang tidak diharapkan" - }, - "step": { - "user": { - "data": { - "email": "Email", - "password": "Kata Sandi" - }, - "description": "Untuk alasan teknis, pastikan untuk menggunakan akun sekunder khusus untuk penyiapan Home Assistant Anda. Anda dapat membuatnya dari aplikasi SmartHab.", - "title": "Siapkan SmartHab" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/smarthab/translations/it.json b/homeassistant/components/smarthab/translations/it.json deleted file mode 100644 index b74da607f77..00000000000 --- a/homeassistant/components/smarthab/translations/it.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "config": { - "error": { - "invalid_auth": "Autenticazione non valida", - "service": "Errore durante il tentativo di raggiungere SmartHab. Il servizio potrebbe non essere attivo. Controlla la connessione.", - "unknown": "Errore imprevisto" - }, - "step": { - "user": { - "data": { - "email": "Email", - "password": "Password" - }, - "description": "Per motivi tecnici, assicurati di utilizzare un account secondario specifico per la tua configurazione di Home Assistant. \u00c8 possibile crearne uno dall'applicazione SmartHab.", - "title": "Configurazione SmartHab" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/smarthab/translations/ja.json b/homeassistant/components/smarthab/translations/ja.json deleted file mode 100644 index a463f259c2a..00000000000 --- a/homeassistant/components/smarthab/translations/ja.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "config": { - "error": { - "invalid_auth": "\u7121\u52b9\u306a\u8a8d\u8a3c", - "service": "SmartHab\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3088\u3046\u3068\u3057\u3066\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30b5\u30fc\u30d3\u30b9\u304c\u30c0\u30a6\u30f3\u3057\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u63a5\u7d9a\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002", - "unknown": "\u4e88\u671f\u3057\u306a\u3044\u30a8\u30e9\u30fc" - }, - "step": { - "user": { - "data": { - "email": "E\u30e1\u30fc\u30eb", - "password": "\u30d1\u30b9\u30ef\u30fc\u30c9" - }, - "description": "\u6280\u8853\u7684\u306a\u7406\u7531\u304b\u3089\u3001Home Assistant\u306e\u8a2d\u5b9a\u306b\u56fa\u6709\u306e\u30bb\u30ab\u30f3\u30c0\u30ea\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002SmartHab\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304b\u3089\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002", - "title": "SmartHab\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/smarthab/translations/ko.json b/homeassistant/components/smarthab/translations/ko.json deleted file mode 100644 index 1641555b412..00000000000 --- a/homeassistant/components/smarthab/translations/ko.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "config": { - "error": { - "invalid_auth": "\uc778\uc99d\uc774 \uc798\ubabb\ub418\uc5c8\uc2b5\ub2c8\ub2e4", - "service": "SmartHab \uc5d0 \uc811\uc18d\ud558\ub294 \uc911 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4. \uc11c\ube44\uc2a4\uac00 \ub2e4\uc6b4\ub418\uc5c8\uc744 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc5f0\uacb0\uc744 \ud655\uc778\ud574\uc8fc\uc138\uc694.", - "unknown": "\uc608\uc0c1\uce58 \ubabb\ud55c \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4" - }, - "step": { - "user": { - "data": { - "email": "\uc774\uba54\uc77c", - "password": "\ube44\ubc00\ubc88\ud638" - }, - "description": "\uae30\uc220\uc801\uc778 \uc774\uc720\ub85c Home Assistant \uc124\uc815\uacfc \uad00\ub828\ub41c \ubcf4\uc870 \uacc4\uc815\uc744 \uc0ac\uc6a9\ud574\uc57c \ud569\ub2c8\ub2e4. SmartHab \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0\uc11c \uc0dd\uc131\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.", - "title": "SmartHab \uc124\uce58\ud558\uae30" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/smarthab/translations/lb.json b/homeassistant/components/smarthab/translations/lb.json deleted file mode 100644 index e651190a1e2..00000000000 --- a/homeassistant/components/smarthab/translations/lb.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "config": { - "error": { - "invalid_auth": "Ong\u00eblteg Authentifikatioun", - "service": "Feeler beim verbanne mat SmartHab. De Service ass viellaicht net ereechbar. Iwwerpr\u00e9if deng Verbindung.", - "unknown": "Onerwaarte Feeler" - }, - "step": { - "user": { - "data": { - "email": "E-Mail", - "password": "Passwuert" - }, - "description": "W\u00e9inst technesche Gr\u00ebnn soll een zweeten Kont benotz gin fir d\u00e4in Home Assistant. Du kanns een zous\u00e4tzleche Kont an der SmartHab Applikatioun erstellen.", - "title": "SmartHab ariichten" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/smarthab/translations/nl.json b/homeassistant/components/smarthab/translations/nl.json deleted file mode 100644 index 31a02ae2b97..00000000000 --- a/homeassistant/components/smarthab/translations/nl.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "config": { - "error": { - "invalid_auth": "Ongeldige authenticatie", - "service": "Fout bij het bereiken van SmartHab. De service is mogelijk uitgevallen. Controleer uw verbinding.", - "unknown": "Onverwachte fout" - }, - "step": { - "user": { - "data": { - "email": "E-mail", - "password": "Wachtwoord" - }, - "description": "Om technische redenen moet u een tweede account gebruiken dat specifiek is voor uw Home Assistant-installatie. U kunt er een aanmaken vanuit de SmartHab-toepassing.", - "title": "Stel SmartHab in" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/smarthab/translations/no.json b/homeassistant/components/smarthab/translations/no.json deleted file mode 100644 index ed2beaf7836..00000000000 --- a/homeassistant/components/smarthab/translations/no.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "config": { - "error": { - "invalid_auth": "Ugyldig godkjenning", - "service": "Feil under fors\u00f8k p\u00e5 \u00e5 n\u00e5 SmartHab. Tjenesten kan v\u00e6re nede. Sjekk tilkoblingen din.", - "unknown": "Uventet feil" - }, - "step": { - "user": { - "data": { - "email": "E-post", - "password": "Passord" - }, - "description": "Av tekniske \u00e5rsaker m\u00e5 du s\u00f8rge for \u00e5 bruke en sekund\u00e6r konto som er spesifikk for oppsettet i Home Assistant. Du kan opprette en fra SmartHab-programmet.", - "title": "Oppsett av SmartHab" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/smarthab/translations/pl.json b/homeassistant/components/smarthab/translations/pl.json deleted file mode 100644 index 14ca88f1c00..00000000000 --- a/homeassistant/components/smarthab/translations/pl.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "config": { - "error": { - "invalid_auth": "Niepoprawne uwierzytelnienie", - "service": "B\u0142\u0105d podczas pr\u00f3by osi\u0105gni\u0119cia SmartHab. Us\u0142uga mo\u017ce by\u0107 wy\u0142\u0105czna. Sprawd\u017a po\u0142\u0105czenie.", - "unknown": "Nieoczekiwany b\u0142\u0105d" - }, - "step": { - "user": { - "data": { - "email": "Adres e-mail", - "password": "Has\u0142o" - }, - "description": "Ze wzgl\u0119d\u00f3w technicznych, nale\u017cy u\u017cy\u0107 dodatkowego konta, specjalnie na u\u017cytek dla Home Assistanta. Mo\u017cesz je utworzy\u0107 z poziomu aplikacji SmartHab.", - "title": "Konfiguracja SmartHab" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/smarthab/translations/pt-BR.json b/homeassistant/components/smarthab/translations/pt-BR.json deleted file mode 100644 index ef205c53827..00000000000 --- a/homeassistant/components/smarthab/translations/pt-BR.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "config": { - "error": { - "invalid_auth": "Autentica\u00e7\u00e3o inv\u00e1lida", - "service": "Erro ao tentar acessar o SmartHab. O servi\u00e7o pode estar inoperante. Verifique sua conex\u00e3o.", - "unknown": "Erro inesperado" - }, - "step": { - "user": { - "data": { - "email": "Email", - "password": "Senha" - }, - "description": "Por motivos t\u00e9cnicos, certifique-se de usar uma conta secund\u00e1ria espec\u00edfica para a configura\u00e7\u00e3o do Home Assistant. Voc\u00ea pode criar um a partir do aplicativo SmartHab.", - "title": "Configurar SmartHab" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/smarthab/translations/pt.json b/homeassistant/components/smarthab/translations/pt.json deleted file mode 100644 index 7430480cc09..00000000000 --- a/homeassistant/components/smarthab/translations/pt.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "config": { - "error": { - "invalid_auth": "Autentica\u00e7\u00e3o inv\u00e1lida", - "unknown": "Erro inesperado" - }, - "step": { - "user": { - "data": { - "email": "Email", - "password": "Palavra-passe" - } - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/smarthab/translations/ru.json b/homeassistant/components/smarthab/translations/ru.json deleted file mode 100644 index 45e3698034f..00000000000 --- a/homeassistant/components/smarthab/translations/ru.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "config": { - "error": { - "invalid_auth": "\u041e\u0448\u0438\u0431\u043a\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.", - "service": "\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043a SmartHab. \u0421\u0435\u0440\u0432\u0438\u0441 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d. \u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435.", - "unknown": "\u041d\u0435\u043f\u0440\u0435\u0434\u0432\u0438\u0434\u0435\u043d\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430." - }, - "step": { - "user": { - "data": { - "email": "\u0410\u0434\u0440\u0435\u0441 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0447\u0442\u044b", - "password": "\u041f\u0430\u0440\u043e\u043b\u044c" - }, - "description": "\u041f\u043e \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0434\u043b\u044f Home Assistant. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0435\u0451 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 SmartHab.", - "title": "SmartHab" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/smarthab/translations/sk.json b/homeassistant/components/smarthab/translations/sk.json deleted file mode 100644 index 72b0304f1c3..00000000000 --- a/homeassistant/components/smarthab/translations/sk.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "config": { - "error": { - "invalid_auth": "Neplatn\u00e9 overenie" - }, - "step": { - "user": { - "data": { - "email": "Email" - } - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/smarthab/translations/tr.json b/homeassistant/components/smarthab/translations/tr.json deleted file mode 100644 index 699967ce8ee..00000000000 --- a/homeassistant/components/smarthab/translations/tr.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "config": { - "error": { - "invalid_auth": "Ge\u00e7ersiz kimlik do\u011frulama", - "service": "SmartHab'a ula\u015fmaya \u00e7al\u0131\u015f\u0131rken hata olu\u015ftu. Servis kapal\u0131 olabilir. Ba\u011flant\u0131n\u0131z\u0131 kontrol edin.", - "unknown": "Beklenmeyen hata" - }, - "step": { - "user": { - "data": { - "email": "E-posta", - "password": "Parola" - }, - "description": "Teknik nedenlerle, Ev Asistan\u0131 kurulumunuza \u00f6zel ikincil bir hesap kulland\u0131\u011f\u0131n\u0131zdan emin olun. SmartHab uygulamas\u0131ndan bir tane olu\u015fturabilirsiniz.", - "title": "SmartHab'\u0131 kurun" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/smarthab/translations/uk.json b/homeassistant/components/smarthab/translations/uk.json deleted file mode 100644 index 036ec0a78d4..00000000000 --- a/homeassistant/components/smarthab/translations/uk.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "config": { - "error": { - "invalid_auth": "\u041d\u0435\u0432\u0456\u0440\u043d\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0446\u0456\u044f.", - "service": "\u041f\u043e\u043c\u0438\u043b\u043a\u0430 \u043f\u0440\u0438 \u0441\u043f\u0440\u043e\u0431\u0456 \u043f\u0456\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044f \u0434\u043e SmartHab. \u0421\u0435\u0440\u0432\u0456\u0441 \u043c\u043e\u0436\u0435 \u0431\u0443\u0442\u0438 \u0432\u0456\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439. \u041f\u0435\u0440\u0435\u0432\u0456\u0440\u0442\u0435 \u0437'\u0454\u0434\u043d\u0430\u043d\u043d\u044f.", - "unknown": "\u041d\u0435\u043e\u0447\u0456\u043a\u0443\u0432\u0430\u043d\u0430 \u043f\u043e\u043c\u0438\u043b\u043a\u0430" - }, - "step": { - "user": { - "data": { - "email": "\u0410\u0434\u0440\u0435\u0441\u0430 \u0435\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0457 \u043f\u043e\u0448\u0442\u0438", - "password": "\u041f\u0430\u0440\u043e\u043b\u044c" - }, - "description": "\u0417 \u0442\u0435\u0445\u043d\u0456\u0447\u043d\u0438\u0445 \u043f\u0440\u0438\u0447\u0438\u043d \u043d\u0435\u043e\u0431\u0445\u0456\u0434\u043d\u043e \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0434\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u0438\u0439 \u043e\u0431\u043b\u0456\u043a\u043e\u0432\u0438\u0439 \u0437\u0430\u043f\u0438\u0441 \u0434\u043b\u044f Home Assistant. \u0412\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u0457\u0457 \u0432 \u0434\u043e\u0434\u0430\u0442\u043a\u0443 SmartHab.", - "title": "SmartHab" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/components/smarthab/translations/zh-Hans.json b/homeassistant/components/smarthab/translations/zh-Hans.json deleted file mode 100644 index f339adebd86..00000000000 --- a/homeassistant/components/smarthab/translations/zh-Hans.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "config": { - "error": { - "invalid_auth": "\u9a8c\u8bc1\u7801\u65e0\u6548" - } - } -} \ No newline at end of file diff --git a/homeassistant/components/smarthab/translations/zh-Hant.json b/homeassistant/components/smarthab/translations/zh-Hant.json deleted file mode 100644 index 9f1d903a9b1..00000000000 --- a/homeassistant/components/smarthab/translations/zh-Hant.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "config": { - "error": { - "invalid_auth": "\u9a57\u8b49\u78bc\u7121\u6548", - "service": "\u5617\u8a66\u8a2a\u554f Smarthab \u6642\u767c\u751f\u932f\u8aa4\uff0c\u670d\u52d9\u53ef\u4ee5\u5df2\u7d93\u5931\u6548\uff0c\u8acb\u6aa2\u67e5\u9023\u7dda\u3002", - "unknown": "\u672a\u9810\u671f\u932f\u8aa4" - }, - "step": { - "user": { - "data": { - "email": "\u96fb\u5b50\u90f5\u4ef6", - "password": "\u5bc6\u78bc" - }, - "description": "\u7531\u65bc\u6280\u8853\u539f\u56e0\u3001\u8acb\u78ba\u5b9a\u6307\u5b9a Home Assistant \u8a2d\u5b9a\u5099\u7528\u5e33\u6236\u3002\u53ef\u4ee5\u900f\u904e Smarthab \u61c9\u7528\u7a0b\u5f0f\u5275\u5efa\u3002", - "title": "\u8a2d\u5b9a SmartHab" - } - } - } -} \ No newline at end of file diff --git a/homeassistant/generated/config_flows.py b/homeassistant/generated/config_flows.py index 3e6b8e10547..9fd116aa715 100644 --- a/homeassistant/generated/config_flows.py +++ b/homeassistant/generated/config_flows.py @@ -300,7 +300,6 @@ FLOWS = [ "sma", "smappee", "smart_meter_texas", - "smarthab", "smartthings", "smarttub", "smhi", diff --git a/requirements_all.txt b/requirements_all.txt index ce8a66e7496..29ceac4f462 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2153,9 +2153,6 @@ slixmpp==1.8.0.1 # homeassistant.components.smart_meter_texas smart-meter-texas==0.4.7 -# homeassistant.components.smarthab -smarthab==0.21 - # homeassistant.components.smhi smhi-pkg==1.0.15 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 1891d670169..9fc53629754 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1369,9 +1369,6 @@ slackclient==2.5.0 # homeassistant.components.smart_meter_texas smart-meter-texas==0.4.7 -# homeassistant.components.smarthab -smarthab==0.21 - # homeassistant.components.smhi smhi-pkg==1.0.15 diff --git a/tests/components/smarthab/__init__.py b/tests/components/smarthab/__init__.py deleted file mode 100644 index 0e393ee0f9e..00000000000 --- a/tests/components/smarthab/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Tests for the SmartHab integration.""" diff --git a/tests/components/smarthab/test_config_flow.py b/tests/components/smarthab/test_config_flow.py deleted file mode 100644 index e6e9dc86101..00000000000 --- a/tests/components/smarthab/test_config_flow.py +++ /dev/null @@ -1,126 +0,0 @@ -"""Test the SmartHab config flow.""" -from unittest.mock import patch - -import pysmarthab - -from homeassistant import config_entries -from homeassistant.components.smarthab import DOMAIN -from homeassistant.const import CONF_EMAIL, CONF_PASSWORD - - -async def test_form(hass): - """Test we get the form.""" - - result = await hass.config_entries.flow.async_init( - DOMAIN, context={"source": config_entries.SOURCE_USER} - ) - assert result["type"] == "form" - assert result["errors"] == {} - - with patch("pysmarthab.SmartHab.async_login"), patch( - "pysmarthab.SmartHab.is_logged_in", return_value=True - ), patch( - "homeassistant.components.smarthab.async_setup", return_value=True - ) as mock_setup, patch( - "homeassistant.components.smarthab.async_setup_entry", return_value=True - ) as mock_setup_entry: - result2 = await hass.config_entries.flow.async_configure( - result["flow_id"], - {CONF_EMAIL: "mock@example.com", CONF_PASSWORD: "test-password"}, - ) - await hass.async_block_till_done() - - assert result2["type"] == "create_entry" - assert result2["title"] == "mock@example.com" - assert result2["data"] == { - CONF_EMAIL: "mock@example.com", - CONF_PASSWORD: "test-password", - } - assert len(mock_setup.mock_calls) == 1 - assert len(mock_setup_entry.mock_calls) == 1 - - -async def test_form_invalid_auth(hass): - """Test we handle invalid auth.""" - result = await hass.config_entries.flow.async_init( - DOMAIN, context={"source": config_entries.SOURCE_USER} - ) - - with patch("pysmarthab.SmartHab.async_login"), patch( - "pysmarthab.SmartHab.is_logged_in", return_value=False - ): - result2 = await hass.config_entries.flow.async_configure( - result["flow_id"], - {CONF_EMAIL: "mock@example.com", CONF_PASSWORD: "test-password"}, - ) - - assert result2["type"] == "form" - assert result2["errors"] == {"base": "invalid_auth"} - - -async def test_form_service_error(hass): - """Test we handle service errors.""" - result = await hass.config_entries.flow.async_init( - DOMAIN, context={"source": config_entries.SOURCE_USER} - ) - - with patch( - "pysmarthab.SmartHab.async_login", - side_effect=pysmarthab.RequestFailedException(42), - ): - result2 = await hass.config_entries.flow.async_configure( - result["flow_id"], - {CONF_EMAIL: "mock@example.com", CONF_PASSWORD: "test-password"}, - ) - - assert result2["type"] == "form" - assert result2["errors"] == {"base": "service"} - - -async def test_form_unknown_error(hass): - """Test we handle unknown errors.""" - result = await hass.config_entries.flow.async_init( - DOMAIN, context={"source": config_entries.SOURCE_USER} - ) - - with patch( - "pysmarthab.SmartHab.async_login", - side_effect=Exception, - ): - result2 = await hass.config_entries.flow.async_configure( - result["flow_id"], - {CONF_EMAIL: "mock@example.com", CONF_PASSWORD: "test-password"}, - ) - - assert result2["type"] == "form" - assert result2["errors"] == {"base": "unknown"} - - -async def test_import(hass): - """Test import.""" - - imported_conf = { - CONF_EMAIL: "mock@example.com", - CONF_PASSWORD: "test-password", - } - - with patch("pysmarthab.SmartHab.async_login"), patch( - "pysmarthab.SmartHab.is_logged_in", return_value=True - ), patch( - "homeassistant.components.smarthab.async_setup", return_value=True - ) as mock_setup, patch( - "homeassistant.components.smarthab.async_setup_entry", return_value=True - ) as mock_setup_entry: - result = await hass.config_entries.flow.async_init( - DOMAIN, context={"source": config_entries.SOURCE_IMPORT}, data=imported_conf - ) - await hass.async_block_till_done() - - assert result["type"] == "create_entry" - assert result["title"] == "mock@example.com" - assert result["data"] == { - CONF_EMAIL: "mock@example.com", - CONF_PASSWORD: "test-password", - } - assert len(mock_setup.mock_calls) == 1 - assert len(mock_setup_entry.mock_calls) == 1