Skip to content

fix: generate a device ID per client instead of a shared one - #81

Merged
codesalatdev merged 1 commit into
mainfrom
fix/random-device-id
Dec 4, 2026
Merged

codesalatdev merged 1 commit into
mainfrom
fix/random-device-id

Conversation

@codesalatdev

Copy link
Copy Markdown
Owner

Picnic's load balancer started answering 403 for the static DID shared between users. This PR generates a random 16 hex DID per PicnicAPI instance. Users can use a persistent device id by reading the generated one after first login via .device_id and can later re-use it in the PicnicAPI constructor (see README).

- Picnic's load balancer answers 403 for the hardcoded x-picnic-did shared by every install (home-assistant/core#196496)
- Generate a random 16-hex device ID per PicnicAPI instance; accept device_id= and expose .device_id so callers can persist it
@codesalatdev codesalatdev added the bug Something isn't working label Dec 4, 2026
@codecov

codecov Bot commented Dec 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.68%. Comparing base (491eea7) to head (1536184).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #81      +/-   ##
==========================================
+ Coverage   94.64%   94.68%   +0.04%     
==========================================
  Files          15       15              
  Lines         653      659       +6     
==========================================
+ Hits          618      624       +6     
  Misses         35       35              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codesalatdev
codesalatdev merged commit 2936da8 into main Dec 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant