Skip to content

Commit

Permalink
Added support for Whirlpool W7I HT58 T.
Browse files Browse the repository at this point in the history
Added new data model entry for oven

Signed-off-by: Adrian Lasota <[email protected]>
Signed-off-by: Adrian Lasota <[email protected]>
  • Loading branch information
adrianlasota authored and Adri9102 committed May 26, 2024
1 parent 703aaed commit 7879a78
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 6 deletions.
33 changes: 33 additions & 0 deletions tests/data/owned_appliances.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,39 @@
"CATEGORY_NAME": "FabricCare",
"MODEL_NO": "WTW8127LW1",
"REPLENISHMENT_DEVICE_MODEL": null
},
{
"DATA_MODEL_KEY": "DDM_COOKING_BIO_SELF_CLEAN_TOURMALINE_V2",
"CATEGORY_NAME": "Cooking",
"MODEL_NO": "000000000000",
"REPLENISHMENT_DEVICE_MODEL": null,
"IMAGE_PATH": null,
"APPLIANCE_ID": 95842,
"APPLIANCE_MASTER_ID": 491,
"MODEL_SKU_ID": null,
"CREATED_AT": 1715804778000,
"UPDATED_AT": 1715804778000,
"APPLIANCE_NAME": "Oven",
"SAID": "0000000000000",
"NEST_AWAY": 0,
"CYCLE_HANDOFF": 0,
"NEST_THERMOSTAT_ID": 0,
"THERMOSTAT_INFLUENCE_THRESHOLD": null,
"THERMOSTAT_DESIRED_OFFSET": null,
"THERMOSTAT_OFFSET_NEEDED": null,
"DELETE_FLAG": 0,
"DISPLAY_POSITION": null,
"SERIAL": "000000000000",
"LOCATION_ID": 260998,
"MACHINE_ID": null,
"MACHINE_POSITION": 0,
"ISVOICEDEFAULT": 1,
"DEVICE_ID": "aaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa",
"IS_ENROLLED": null,
"STATUS": "CLAIMED",
"APPLIANCE_TYPE_ID": null,
"MACHINE_STATUS": null,
"APPLIANCE_MODE": 2
}
]
}
2 changes: 2 additions & 0 deletions tests/test_appliancesmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ async def test_fetch_appliances_with_set_account_id(

# ensure that the washer_dryers list is populated
assert len(am.washer_dryers) == 2
# ensure that the oven list is populated
assert len(am.ovens) == 1

await http_client_mock.close_session()

Expand Down
13 changes: 7 additions & 6 deletions whirlpool/appliancesmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@ def _add_appliance(self, appliance: dict[str, Any]) -> None:
if "dryer" in data_model or "washer" in data_model:
self._washer_dryers.append(appliance_data)
return

if (
"cooking_minerva" in data_model
or "cooking_vsi" in data_model
or "cooking_u2" in data_model
):
oven_models = [
"cooking_minerva",
"cooking_vsi",
"cooking_u2",
"ddm_cooking_bio_self_clean_tourmaline_v2",
]
if any(model in data_model for model in oven_models):
self._ovens.append(appliance_data)
return

Expand Down

0 comments on commit 7879a78

Please sign in to comment.