-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serial Stream with HA and message delimiter #327
base: develop
Are you sure you want to change the base?
Conversation
Hi @jtkDvlp, could you please add an example configuration for your extended config input? |
Hi @BenjiU, hopefully the added example config helps. Best Regards |
Mmh does anyone known, why the CI does not accept the return type? It seems to be correct for me, None or byte array. 🤔 |
if data: | ||
data = data[:-len(self.config["delimiter"])] | ||
else: | ||
data = self.ser.read(self.ser.in_waiting) or None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jtkDvlp I guess this is the problem:
read has to return Optinal[bytes], but in line 107 it may return "None" (or with the preset in line 98)
No description provided.