Update Plugwise config_flow once more (#53423)

This commit is contained in:
Bouwe Westerdijk 2021-07-24 14:28:33 +02:00 committed by GitHub
parent 6d493a848c
commit e65283389d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 12 deletions

View File

@ -42,14 +42,7 @@ _LOGGER = logging.getLogger(__name__)
CONF_MANUAL_PATH = "Enter Manually"
CONNECTION_SCHEMA = vol.Schema(
{
vol.Required(FLOW_TYPE, default=FLOW_NET): vol.In(
{
FLOW_NET: f"Network: {SMILE} / {STRETCH}",
FLOW_USB: "USB: To be added later",
}
),
},
{vol.Required(FLOW_TYPE, default=FLOW_NET): vol.In([FLOW_NET, FLOW_USB])}
)
# PLACEHOLDER USB connection validation
@ -148,8 +141,6 @@ class PlugwiseConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
user_input[CONF_PORT] = self.discovery_info[CONF_PORT]
user_input[CONF_USERNAME] = self.discovery_info[CONF_USERNAME]
self._async_abort_entries_match({CONF_HOST: user_input[CONF_HOST]})
try:
api = await validate_gw_input(self.hass, user_input)

View File

@ -5,11 +5,11 @@ ATTR_ILLUMINANCE = "illuminance"
COORDINATOR = "coordinator"
DEVICE_STATE = "device_state"
DOMAIN = "plugwise"
FLOW_NET = "flow_network"
FLOW_NET = "Network: Smile/Stretch"
FLOW_SMILE = "smile (Adam/Anna/P1)"
FLOW_STRETCH = "stretch (Stretch)"
FLOW_TYPE = "flow_type"
FLOW_USB = "flow_usb"
FLOW_USB = "USB: Stick - Coming soon"
GATEWAY = "gateway"
PW_TYPE = "plugwise_type"
SCHEDULE_OFF = "false"