Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/skykettle-ha.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2022-08-13 10:53:21 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2022-08-13 10:53:21 +0300
commitfee42df0b76ea37e0b4a29292c43c3c62f7c44cd (patch)
tree971a8b7d3bb3fe17544536afa6c0c44b22980aeb
parent664b32d58215244d449ff1bf493860e53e436767 (diff)
config_flow
-rw-r--r--custom_components/skykettle/config_flow.py14
-rw-r--r--custom_components/skykettle/translations/en.json5
-rw-r--r--custom_components/skykettle/translations/ru.json5
3 files changed, 1 insertions, 23 deletions
diff --git a/custom_components/skykettle/config_flow.py b/custom_components/skykettle/config_flow.py
index 32e6bc1..6243670 100644
--- a/custom_components/skykettle/config_flow.py
+++ b/custom_components/skykettle/config_flow.py
@@ -52,17 +52,8 @@ class SkyKettleConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
async def async_step_user(self, user_input=None):
"""Handle the user step."""
- return await self.async_step_scan_message()
+ return await self.async_step_scan()
- async def async_step_scan_message(self, user_input=None):
- """Handle the scan_message step."""
- if user_input is not None:
- return await self.async_step_scan()
- return self.async_show_form(
- step_id="scan_message",
- data_schema=vol.Schema({})
- )
-
async def async_step_scan(self, user_input=None):
"""Handle the scan step."""
errors = {}
@@ -82,9 +73,6 @@ class SkyKettleConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
try:
scanner = bluetooth.async_get_scanner(self.hass)
- await scanner.start()
- await asyncio.sleep(5)
- await scanner.stop()
for device in scanner.discovered_devices:
_LOGGER.debug(f"Device found: {device.address} - {device.name}")
devices_filtered = [device for device in scanner.discovered_devices if device.name and (device.name.startswith("RK-") or device.name.startswith("RFS-"))]
diff --git a/custom_components/skykettle/translations/en.json b/custom_components/skykettle/translations/en.json
index bf22998..284efdb 100644
--- a/custom_components/skykettle/translations/en.json
+++ b/custom_components/skykettle/translations/en.json
@@ -4,11 +4,6 @@
"abort": {
"kettle_not_found": "Can't find any supported kettle. Please make sure that your kettle is in the list of supported devices and it's on the stand.",
"already_configured": "Integration for this kettle is already configured.",
- "linux_not_found": "Sorry, Linux-based system required.",
- "hcitool_not_found": "hcitool binary not found.",
- "hatttool_not_found": "hatttool binary not found.",
- "timeout_not_found": "\"timeout\" binary not found.",
- "permission_error": "Permission error, make sure that hcitool and hatttool are granted with privileges (check instructions).",
"unknown_model": "Your kettle model is not yet supported by this integration. But you can help add support for it! Contact the author via the 'issues' section on GitHub ('report an issue' in HACS).",
"unknown": "Unknown error, please check logs."
},
diff --git a/custom_components/skykettle/translations/ru.json b/custom_components/skykettle/translations/ru.json
index de21347..9732312 100644
--- a/custom_components/skykettle/translations/ru.json
+++ b/custom_components/skykettle/translations/ru.json
@@ -4,11 +4,6 @@
"abort": {
"kettle_not_found": "Не могу найти чайник. Пожалуйста, убедитесь, что модель вашего чайника есть в списке поддерживаемых, и что он стоит на подставке.",
"already_configured": "Для этого чайника интеграция уже настроена.",
- "linux_not_found": "Извините, эта интеграция может работать только под Linux.",
- "hcitool_not_found": "Утилита \"hcitool\" не найдена.",
- "hatttool_not_found": "Утилита \"hatttool\" не найдена.",
- "timeout_not_found": "Утилита \"timeout\" не найдена.",
- "permission_error": "Отсутствуют права доступа, убедитесь в том, что утилитам \"hcitool\" и \"hatttool\" предоставлены права на доступ к BLE (смотрите инструкцию).",
"unknown_model": "Модель вашего чайника пока что не поддерживается этой интеграцией. Но вы можете помочь добавить его поддержку! Свяжитесь с автором через раздел 'issues' на GitHub ('сообщить о проблеме' в HACS).",
"unknown": "Неизвестная ошибка, смотрите логи."
},