- 
                Notifications
    You must be signed in to change notification settings 
- Fork 109
Description
Bug Description
On Fisher & Paykel dual-drawer dishwasher, the dishwasher user settings sometimes report wash-zone bits 11b (=3). I believe others report similar issues.
Current UserWashZoneSetting only defines:
- 0 = BOTH
- 1 = UPPER
- 2 = LOWER
So when the SDK tries to construct UserWashZoneSetting(3), it raises and logs constantly in Home Assistant.
Log Example
ERROR (MainThread) [gehomesdk.erd.converters.dishwasher.erd_user_setting_converter] Could not construct user setting, using default.
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/gehomesdk/erd/converters/dishwasher/erd_user_setting_converter.py", line 36, in erd_decode
wash_zone = UserWashZoneSetting((i & 3145728) >> 20),
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/enum.py", line 726, in call
return cls.new(cls, value)
~~~~~~~~~~~^^^^^^^^^^^^
File "/usr/local/lib/python3.13/enum.py", line 1201, in new
raise ve_exc
ValueError: 3 is not a valid UserWashZoneSetting
This repeats every time the dishwasher reports settings.
Example raw values observed
- DISHWASHER_USER_SETTING raw_value='300004'
- DISHWASHER_UPPER_USER_SETTING raw_value='300404'
Here (i & 0x300000) >> 20 → 3.
Proposed fix
Treat 3 as BOTH. Two possible approaches:
- Add BOTH_ALT = 3toUserWashZoneSetting, and normalize it back to BOTH; or
- Catch unknown values in the converter and map 3→ BOTH.
Workaround / Tested fix
I tested a local patch in the Home Assistant custom integration and the errors have stopped.
UserWashZoneSetting._value2member_map_[3] = UserWashZoneSetting.BOTH