garbled1/homeassistant_ecowitt

New "WittBoy" device. Some sensors unhandled (piezoelectric rain detector)

vixium opened this issue · 2 comments

Hi,
I have a GW2000 with a new Ecowitt WittBoy that has a piezoelectric rain detector.
Ecowitt integration doesn't handle some sensors:

"Logger: custom_components.ecowitt
Source: custom_components/ecowitt/init.py:274
Integration: Ecowitt Weather Station
First occurred: 18:21:04 (649 occurrences)
Last logged: 18:38:04

Unhandled sensor type mrain_piezo value 0.055, file a PR.
Unhandled sensor type yrain_piezo value 0.055, file a PR.
Unhandled sensor type ws90cap_volt value 5.2, file a PR.
Unhandled sensor type ws90_ver value 126, file a PR.
Unhandled sensor type wh90batt value 3.22, file a PR."

I tried reinstall, modified "const.py" to add these sensors as TYPE_SENSOR, like this:
TYPE_RRAIN_PIEZO = "rainratemm"
TYPE_ERAIN_PIEZO = "eventrainmm"
TYPE_HRAIN_PIEZO = "hourlyrainmm"
TYPE_DRAIN_PIEZO = "dailyrainmm"
TYPE_WRAIN_PIEZO = "weeklyrainmm"
TYPE_MRAIN_PIEZO = "monthlyrainmm"
TYPE_YRAIN_PIEZO = "yearlyrainmm"
and then in SENSOR TYPES
TYPE_RRAIN_PIEZO: ("Rain Rate", f"mm/{TIME_HOURS}",
TYPE_SENSOR, None, "mdi:water", S_METRIC,
STATE_CLASS_TOTAL_INCREASING),
TYPE_ERAIN_PIEZO: ("Event Rain Rate", f"mm/{TIME_HOURS}",
TYPE_SENSOR, None, "mdi:water", S_METRIC,
STATE_CLASS_TOTAL_INCREASING),
TYPE_HRAIN_PIEZO: ("Hourly Rain Rate", f"mm/{TIME_HOURS}",
TYPE_SENSOR, None, "mdi:water", S_METRIC,
STATE_CLASS_TOTAL_INCREASING),
TYPE_DRAIN_PIEZO: ("Daily Rain Rate", f"mm/{TIME_DAYS}",
TYPE_SENSOR, None, "mdi:water", S_METRIC,
STATE_CLASS_TOTAL_INCREASING),
TYPE_WRAIN_PIEZO: ("Weekly Rain Rate", f"mm/{TIME_WEEKS}",
TYPE_SENSOR, None, "mdi:water", S_METRIC,
STATE_CLASS_TOTAL_INCREASING),
TYPE_MRAIN_PIEZO: ("Monthly Rain Rate", f"mm/{TIME_MONTHS}",
TYPE_SENSOR, None, "mdi:water", S_METRIC,
STATE_CLASS_TOTAL_INCREASING),
TYPE_YRAIN_PIEZO: ("Yearly Rain Rate", f"mm/{TIME_YEARS}",
TYPE_SENSOR, None, "mdi:water", S_METRIC,
STATE_CLASS_TOTAL_INCREASING),

But, it doesn't work.

Could you add them, please?

Thanks a lot
vixium

Sorry, it is repeated.
#107

Still with the error. Reopen.