Skip to content

Commit

Permalink
Merge pull request #40 from Hypfer/dev_duofernstick
Browse files Browse the repository at this point in the history
Allow selecting /dev/duofernstick in config flow
  • Loading branch information
gluap authored Aug 23, 2023
2 parents e406a5f + 7a7fd82 commit 87dcd7d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/duofern/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ async def async_step_user(self, user_input: Mapping[str, Any]|None =None) -> Flo
if os.path.isdir("/dev/"):
serialdevs.update(set(glob.glob("/dev/ttyU*")))
serialdevs.update(set(glob.glob("/dev/ttyA*")))
serialdevs.update(set(glob.glob("/dev/duofernstick")))

if len(serialdevs) == 0:
serialdevs = set(["could not find /dev/serial/by-id/ or /dev/tty{U,A}*, did you plug in your duofern stick correctly?"])
serialdevs = set(["could not find /dev/serial/by-id/, /dev/tty{U,A}* or /dev/duofernstick. Did you plug in your duofern stick correctly?"])

return self.async_show_form(
step_id='user',
Expand Down

0 comments on commit 87dcd7d

Please sign in to comment.