Allow to specify only the unique part of mDNS
Opened this issue · 0 comments
Sibgatulin commented
Currently, config_flow allows to specify either an IP address, or a full mDNS string. In our case, the latter can be easily interpolated from the first 5 characters of the serial. Would be neat to allow the user to pass them, instead of the full string. Depends on CorantGmbH/aioairq#2.
Should we even offer to instantiate with the IP?.. Only allowing the 5 character substring would make for a neatly strict schema:
vol.Required(CONF_ID): vol.All(str, vol.Length(min=5, max=5))