diff --git a/homeassistant/components/nibe_heatpump/config_flow.py b/homeassistant/components/nibe_heatpump/config_flow.py index bd48583547c..d68def046fd 100644 --- a/homeassistant/components/nibe_heatpump/config_flow.py +++ b/homeassistant/components/nibe_heatpump/config_flow.py @@ -14,7 +14,7 @@ from homeassistant import config_entries from homeassistant.const import CONF_IP_ADDRESS, CONF_MODEL from homeassistant.core import HomeAssistant from homeassistant.data_entry_flow import FlowResult -from homeassistant.helpers import config_validation as cv +from homeassistant.helpers import selector from .const import ( CONF_CONNECTION_TYPE, @@ -27,13 +27,22 @@ from .const import ( LOGGER, ) +PORT_SELECTOR = vol.All( + selector.NumberSelector( + selector.NumberSelectorConfig( + min=1, step=1, max=65535, mode=selector.NumberSelectorMode.BOX + ) + ), + vol.Coerce(int), +) + STEP_USER_DATA_SCHEMA = vol.Schema( { vol.Required(CONF_MODEL): vol.In(list(Model.__members__)), - vol.Required(CONF_IP_ADDRESS): str, - vol.Required(CONF_LISTENING_PORT, default=9999): cv.port, - vol.Required(CONF_REMOTE_READ_PORT, default=9999): cv.port, - vol.Required(CONF_REMOTE_WRITE_PORT, default=10000): cv.port, + vol.Required(CONF_IP_ADDRESS): selector.TextSelector(), + vol.Required(CONF_LISTENING_PORT, default=9999): PORT_SELECTOR, + vol.Required(CONF_REMOTE_READ_PORT, default=9999): PORT_SELECTOR, + vol.Required(CONF_REMOTE_WRITE_PORT, default=10000): PORT_SELECTOR, } ) diff --git a/homeassistant/components/nibe_heatpump/strings.json b/homeassistant/components/nibe_heatpump/strings.json index 9bbee6ae2ee..08a049cb17a 100644 --- a/homeassistant/components/nibe_heatpump/strings.json +++ b/homeassistant/components/nibe_heatpump/strings.json @@ -2,11 +2,18 @@ "config": { "step": { "user": { + "description": "Before attempting to configure the integration, verify that:\n - The NibeGW unit is connected to a heat pump.\n - The MODBUS40 accessory has been enabled in the heat pump configuration.\n - The pump has not gone into an alarm state about missing MODBUS40 accessory.", "data": { "ip_address": "Remote address", "remote_read_port": "Remote read port", "remote_write_port": "Remote write port", "listening_port": "Local listening port" + }, + "data_description": { + "ip_address": "The address of the NibeGW unit. The device should have been configured with a static address.", + "remote_read_port": "The port the NibeGW unit is listening for read requests on.", + "remote_write_port": "The port the NibeGW unit is listening for write requests on.", + "listening_port": "The local port on this system, that the NibeGW unit is configured to send data to." } } }, diff --git a/homeassistant/components/nibe_heatpump/translations/en.json b/homeassistant/components/nibe_heatpump/translations/en.json index 3837989511f..459b0792df7 100644 --- a/homeassistant/components/nibe_heatpump/translations/en.json +++ b/homeassistant/components/nibe_heatpump/translations/en.json @@ -15,7 +15,14 @@ "listening_port": "Local listening port", "remote_read_port": "Remote read port", "remote_write_port": "Remote write port" - } + }, + "data_description": { + "ip_address": "The address of the NibeGW unit. The device should have been configured with a static address.", + "listening_port": "The local port on this system, that the NibeGW unit is configured to send data to.", + "remote_read_port": "The port the NibeGW unit is listening for read requests on.", + "remote_write_port": "The port the NibeGW unit is listening for write requests on." + }, + "description": "Before attempting to configure the integration, verify that:\n - The NibeGW unit is connected to a heat pump.\n - The MODBUS40 accessory has been enabled in the heat pump configuration.\n - The pump has not gone into an alarm state about missing MODBUS40 accessory." } } }