Skip to content

Add support for Ecowitt WN20#3467

Open
rromanchuk wants to merge 2 commits intomerbanan:masterfrom
rromanchuk:feat-ecowitt-wn20
Open

Add support for Ecowitt WN20#3467
rromanchuk wants to merge 2 commits intomerbanan:masterfrom
rromanchuk:feat-ecowitt-wn20

Conversation

@rromanchuk
Copy link
Copy Markdown

@rromanchuk rromanchuk marked this pull request as ready for review February 13, 2026 08:40
@zuckschwerdt
Copy link
Copy Markdown
Collaborator

Thanks, looks great!

  • You missed one indent space in the int id line.
  • What is that extra data, isn't the code just 10 bytes?
  • The battery_ok should be 0/1 (not sure where to cut off if there is no battery low flag?),
  • And add "battery_pct", "Battery level", DATA_INT, battery_lvl, // Note: this might change with #3103

@rromanchuk
Copy link
Copy Markdown
Author

I will take another pass shortly. i struggled with battery in general and trying to align it with convention

float battery_v = battery_raw * 0.02f; // 2xAAA, nominal ~3.0V
int battery_lvl = battery_raw <= 90 ? 0 : 100 * (battery_raw - 90) / 60; // 1.8V-3.0V is 0-100
int rain_raw = (b[5] << 8) | b[6];
char extra[11];
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This is to large and it needs to be initialized to 0.

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.

3 participants