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

CREAT broadlink A2 #714

Closed
wants to merge 3 commits into from
Closed

CREAT broadlink A2 #714

wants to merge 3 commits into from

Conversation

trz0332
Copy link

@trz0332 trz0332 commented Aug 18, 2022

CREAT broadlink A2

@felipediel felipediel mentioned this pull request Apr 11, 2024
13 tasks
@felipediel
Copy link
Collaborator

Good job @trz0332, thank you! I'm preparing this PR for the next release. Could you give me a sample of check_sensors_raw()? And maybe a link to the device? I didn't find it anywhere.

@felipediel
Copy link
Collaborator

Comment on lines +64 to +70
return {
"temperature": data[0xd]*255+ data[0xe],
"humidity": data[0xf]*255+ data[0x10],
"PM10": data[0x7]*255+ data[0x8],
"PM2.5": data[0x9]*255+ data[0xa],
"PM1.0": data[0xb]*255+ data[0xc],
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe * 256 instead?

        return {
            "temperature": data[0xd] * 256 + data[0xe],
            "humidity": data[0xf] * 256 + data[0x10],
            "PM10": data[0x7] * 256 + data[0x8],
            "PM2.5": data[0x9] * 256 + data[0xa],
            "PM1.0": data[0xb] * 256 + data[0xc],
        }

@felipediel
Copy link
Collaborator

Closed with #791 and #792.

Good job, @trz0332, thank you!

@felipediel felipediel closed this Apr 12, 2024
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