Skip to content

Commit 0295163

Browse files
committed
More fixes
1 parent ff805a9 commit 0295163

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

custom_components/plugwise_usb/config_flow.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@
2020
@callback
2121
def plugwise_stick_entries(hass):
2222
"""Return existing connections for Plugwise USB-stick domain."""
23-
sticks = []
24-
for entry in hass.config_entries.async_entries(DOMAIN):
25-
sticks.append(entry.data.get(CONF_USB_PATH))
26-
return sticks
23+
24+
return [entry.data.get(CONF_USB_PATH) for entry in hass.config_entries.async_entries(DOMAIN)]
2725

2826

2927
async def validate_usb_connection(
@@ -114,9 +112,7 @@ async def async_step_manual_path(
114112
step_id="manual_path",
115113
data_schema=vol.Schema(
116114
{
117-
vol.Required(
118-
CONF_USB_PATH, default="/dev/ttyUSB0" or vol.UNDEFINED
119-
): str
115+
vol.Required(CONF_USB_PATH, default="/dev/ttyUSB0"): str
120116
}
121117
),
122118
errors=errors,

0 commit comments

Comments
 (0)