Skip to content

Fix: family-member accounts get empty device list - #63

Open
jjkk52 wants to merge 1 commit into
Yonsm:mainfrom
jjkk52:fix/shared-family-devices
Open

Fix: family-member accounts get empty device list#63
jjkk52 wants to merge 1 commit into
Yonsm:mainfrom
jjkk52:fix/shared-family-devices

Conversation

@jjkk52

Copy link
Copy Markdown

Fixes#62

Family-member accounts (非管理员) got an empty device list from device_list() even though home_list() returned homes/rooms correctly. The old /home/device_list endpoint only returns the account's own devices, so shared-home devices were invisible.

Changes:

  • home_list(): call /v2/homeroom/gethome with fetch_share/fetch_share_dev and merge homelist + share_home_list, so shared homes (and their rooms/devices) are returned.
  • device_list(): collect dids from all own + shared homes via the new _home_dids(), then query /v2/home/device_list_page with explicit dids (batched), which returns shared/family-member devices; falls back to the old endpoint when no homes are found.

Verified against a family-member account: 77 devices in the shared home are now listed identically to the admin account (same split/sub-device handling).

Use /v2/homeroom/gethome with fetch_share/fetch_share_dev and merge
share_home_list into home_list, so shared homes and their devices are
visible. device_list now collects dids from all (own + shared) homes and
queries /v2/home/device_list_page with explicit dids, which also returns
shared/family-member devices that the old /home/device_list misses.
FixesYonsm#62
Sign up for freeto 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.

家庭成员获取设备列表为空,是否为bug

1 participant

@jjkk52