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

Add support for Bresser Lightning Sensor and Bresser Air Quality Sensor #2698

Merged
merged 16 commits into from
Oct 30, 2023
Merged

Add support for Bresser Lightning Sensor and Bresser Air Quality Sensor #2698

merged 16 commits into from
Oct 30, 2023

Conversation

matthias-bs
Copy link
Contributor

@matthias-bs matthias-bs commented Oct 27, 2023

See #2140 and #2693

@matthias-bs matthias-bs changed the title Add support for Bresser Lightning Sensor Add support for Bresser Lightning Sensor and Bresser Air Quality Sensor Oct 27, 2023
@zuckschwerdt
Copy link
Collaborator

Yes, that's what I meant. But they should have the same r_device and output_fields, otherwise this would give duplicate outputs.

@matthias-bs
Copy link
Contributor Author

Do you mean I should merge both r_device and output_fields? How should I set the device name then?

@zuckschwerdt
Copy link
Collaborator

You can use a .name like you already sketched in the README: "Bresser Weather Center 7-in-1, Air Quality PM2.5/PM10"

@matthias-bs
Copy link
Contributor Author

How about the assignment to data? Can I leave it as it is or do I have to move it out of the conditional code and assign dummy values for unavailable data?

@zuckschwerdt
Copy link
Collaborator

The data struct is flexible. I would even use

if (SENSOR_TYPE_WEATHER) { ... decoder_output_data(); return 1;}
else if (SENSOR_TYPE_AIR_PM) { ... decoder_output_data(); return 1;}
else { log... ; return DECODE_FAIL_SANITY;}

@matthias-bs
Copy link
Contributor Author

All done now.

@zuckschwerdt
Copy link
Collaborator

Looks almost perfect now, thanks!

@zuckschwerdt
Copy link
Collaborator

Good for merge. Last call for comments ;)

@matthias-bs
Copy link
Contributor Author

Done (for now)! Thank you!

@zuckschwerdt zuckschwerdt merged commit 3a9c61b into merbanan:master Oct 30, 2023
5 checks passed
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.

None yet

2 participants