Adding Custom Data Entry Flow using Voluptuous "Any"

Hi, I’m the author of the Visonic Alarm Panel plugin and I’ve been having a go at writing a data entry flow as described here

I’m trying to ask the user to select either “ethernet” or “usb” and attempted to include this in the schema

import voluptuous as vol
.... more code here ....
    vol.Required(CONF_DEVICE_TYPE, default="ethernet") : vol.Any( "ethernet", "usb" )
..... and then create the schema like this ........

But this produced the following in the log file

2020-04-13 10:48:39 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/", line 418, in start
    resp = await task
  File "/usr/local/lib/python3.7/site-packages/aiohttp/", line 458, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/", line 39, in real_ip_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/", line 73, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/", line 127, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/", line 125, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/", line 131, in post
    return await super().post(request)
  File "/usr/src/homeassistant/homeassistant/components/http/", line 54, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/", line 70, in post
    result = self._prepare_result_json(result)
  File "/usr/src/homeassistant/homeassistant/components/config/", line 136, in _prepare_result_json
    return super()._prepare_result_json(result)
  File "/usr/src/homeassistant/homeassistant/helpers/", line 42, in _prepare_result_json
    schema, custom_serializer=cv.custom_serializer
  File "/usr/local/lib/python3.7/site-packages/voluptuous_serialize/", line 38, in convert
    pval = convert(value, custom_serializer=custom_serializer)
  File "/usr/local/lib/python3.7/site-packages/voluptuous_serialize/", line 108, in convert
    raise ValueError('Unable to convert schema: {}'.format(schema))
ValueError: Unable to convert schema: Any('ethernet', 'usb', msg=None)

I can get strings, integers and booleans to work but nothing else. Is it currently limited to these basic types or should I be able to do what I’m trying to do?

I think you want vol.In instead of vol.All.

Thankyou for the help, I changed it to the following and it worked

    vol.Required(CONF_DEVICE_TYPE, default="ethernet") : vol.In( ["ethernet", "usb"] )