File tree Expand file tree Collapse file tree 1 file changed +0
-11
lines changed
custom_components/solaredge_modbus_multi Expand file tree Collapse file tree 1 file changed +0
-11
lines changed Original file line number Diff line number Diff line change 2525from .helpers import device_list_from_string , host_valid
2626
2727
28- @callback
29- def solaredge_modbus_multi_entries (hass : HomeAssistant ):
30- """Return the hosts already configured."""
31- return set (
32- entry .data [CONF_HOST ].lower ()
33- for entry in hass .config_entries .async_entries (DOMAIN )
34- )
35-
36-
3728class SolaredgeModbusMultiConfigFlow (config_entries .ConfigFlow , domain = DOMAIN ):
3829 """Handle a config flow for SolarEdge Modbus Multi."""
3930
@@ -68,8 +59,6 @@ async def async_step_user(
6859 else :
6960 if not host_valid (user_input [CONF_HOST ]):
7061 errors [CONF_HOST ] = "invalid_host"
71- elif user_input [CONF_HOST ] in solaredge_modbus_multi_entries (self .hass ):
72- errors [CONF_HOST ] = "already_configured"
7362 elif not 1 <= user_input [CONF_PORT ] <= 65535 :
7463 errors [CONF_PORT ] = "invalid_tcp_port"
7564 elif not 1 <= inverter_count <= 32 :
You can’t perform that action at this time.
0 commit comments