From 1bdf47a3ac55ac6ad5b4631a08bd4b5eaff694c5 Mon Sep 17 00:00:00 2001 From: functionpointer Date: Wed, 27 Jan 2021 21:32:10 +0100 Subject: [PATCH] MySensors: Fix gw_stop and the translations --- .../components/mysensors/__init__.py | 2 +- .../components/mysensors/translations/en.json | 49 +++++++++++++++++-- 2 files changed, 45 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/mysensors/__init__.py b/homeassistant/components/mysensors/__init__.py index 9d937aa88a3..93f3be7cd2c 100644 --- a/homeassistant/components/mysensors/__init__.py +++ b/homeassistant/components/mysensors/__init__.py @@ -214,7 +214,7 @@ async def async_unload_entry(hass: HomeAssistantType, entry: ConfigEntry) -> boo del hass.data[DOMAIN][MYSENSORS_GATEWAYS][entry.entry_id] - await gw_stop(hass, gateway) + await gw_stop(hass, entry, gateway) return True diff --git a/homeassistant/components/mysensors/translations/en.json b/homeassistant/components/mysensors/translations/en.json index 873ed2ed721..156fe4c1e2f 100644 --- a/homeassistant/components/mysensors/translations/en.json +++ b/homeassistant/components/mysensors/translations/en.json @@ -1,19 +1,58 @@ { "config": { "abort": { - "already_configured": "Device is already configured" + "already_configured": "Device is already configured", + "single_instance_allowed": "Already configured. Only a single configuration possible." }, "error": { "cannot_connect": "Failed to connect", - "invalid_auth": "Invalid authentication", + "invalid_subscribe_topic": "Invalid subscribe topic", + "invalid_publish_topic": "Invalid publish topic", + "invalid_port": "Invalid port number", + "invalid_persistence_file": "Invalid persistence file", + "invalid_ip": "Invalid IP address", + "invalid_serial": "Invalid serial port", + "invalid_device": "Invalid device", + "invalid_version": "Invalid MySensors version", + "not_a_number": "Please enter a number", + "port_out_of_range": "Port number must be at least 1 and at most 65535", "unknown": "Unexpected error" }, "step": { "user": { "data": { - "host": "Host", - "password": "Password", - "username": "Username" + "optimistic": "optimistic", + "persistence": "persistence", + "gateway_type_mqtt": "MQTT" + }, + "description": "Choose connection method to the gateway" + }, + "gw_tcp": { + "description": "Ethernet gateway setup", + "data": { + "device": "IP address of the gateway", + "tcp_port": "port", + "version": "MySensors version", + "persistence_file": "persistence file (leave empty to auto-generate)" + } + }, + "gw_serial": { + "description": "Serial gateway setup", + "data": { + "device": "Serial port", + "baud_rate": "baud rate", + "version": "MySensors version", + "persistence_file": "persistence file (leave empty to auto-generate)" + } + }, + "gw_mqtt": { + "description": "MQTT gateway setup", + "data": { + "retain": "mqtt retain", + "topic_in_prefix": "prefix for input topics (topic_in_prefix)", + "topic_out_prefix": "prefix for output topics (topic_out_prefix)", + "version": "MySensors version", + "persistence_file": "persistence file (leave empty to auto-generate)" } } }