Skip to content
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

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

jtkDvlp
Copy link

@jtkDvlp jtkDvlp commented Jul 28, 2023

No description provided.

@BenjiU
Copy link
Collaborator

BenjiU commented Jul 31, 2023

Hi @jtkDvlp, could you please add an example configuration for your extended config input?

@BenjiU BenjiU self-assigned this Jul 31, 2023
@jtkDvlp
Copy link
Author

jtkDvlp commented Jul 31, 2023

Hi @BenjiU,

hopefully the added example config helps.

Best Regards

@jtkDvlp
Copy link
Author

jtkDvlp commented Aug 3, 2023

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
Copy link
Collaborator

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants