Skip to content

Fix login by updating pysmarthashtag to 0.9.1#431

Merged
DasBasti merged 3 commits into
mainfrom
copilot/explore-refreshing-login
Jun 4, 2026
Merged

Fix login by updating pysmarthashtag to 0.9.1#431
DasBasti merged 3 commits into
mainfrom
copilot/explore-refreshing-login

Conversation

Copilot AI commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Login fails with "Could not get login token from login page" / "Could not get location from auth page" because Smart moved the context parameter to a different redirect hop in their OIDC chain, breaking the parsing in pysmarthashtag 0.8.1.

  • Dependency bump: pysmarthashtag 0.8.1 → 0.9.1, which includes a rewritten login flow that walks the full redirect chain and adaptive AIMD backoff to prevent WAF lockout during HA's retry loop (~80s interval)
  • Integration version: left unchanged in this PR (release process handles version bumping)

Copilot AI linked an issue Jun 4, 2026 that may be closed by this pull request
The login errors "Could not get login token from login page" and
"Could not get location from auth page" are caused by Smart's auth
endpoint changing its response format. pysmarthashtag 0.9.1 includes:
- Rewritten OIDC + Gigya login flow handling the new redirect chain
- Adaptive rate-limit backoff to prevent WAF lockout during retries
- Better error diagnostics with HTTP status and body excerpts

Bumps integration version to 0.8.4.
Copilot AI changed the title [WIP] Fix login issue and refresh token retrieval Fix login by updating pysmarthashtag to 0.9.1 Jun 4, 2026
Copilot AI requested a review from DasBasti June 4, 2026 11:03
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Coverage

Coverage Report
FileStmtsMissCoverMissing
smarthashtag
   __init__.py27485%64–67
   binary_sensor.py33487%160, 167, 177, 179
   climate.py1341489%53–54, 89, 131–132, 141–142, 151–152, 159, 162, 177, 180, 211
   config_flow.py801976%65–66, 146–147, 149–150, 152–153, 155–156, 162–164, 167–170, 172, 211
   const.py410100% 
   coordinator.py871978%68–75, 116, 121, 123, 127, 180–183, 189, 222–223
   device_tracker.py731086%68, 82, 84–86, 94, 131, 133–135
   entity.py15286%48–49
   select.py751284%84–85, 109, 112–113, 126–127, 144, 149, 171, 185–186
   sensor.py3108173%161, 203, 208, 215, 222–223, 226, 236, 251–252, 255, 283, 289–290, 293, 306, 310–311, 314, 345, 348–351, 359, 367, 370, 376, 379–380, 383, 393, 395–398, 402–404, 450, 459–460, 463, 488, 494–495, 497–498, 501, 511, 515–516, 546, 555, 557–559, 564, 567, 577, 581–582, 607–612, 614–619, 621–622, 625, 635, 638–640
   switch.py701775%34–35, 70, 78–79, 95–97, 104, 107, 115, 117, 127, 130, 138–139, 151
smarthashtag/sensor_groups
   __init__.py100100% 
   battery.py30100% 
   climate.py30100% 
   general.py30100% 
   maintenance.py30100% 
   position.py30100% 
   running.py30100% 
   safety.py40100% 
   tire.py30100% 
TOTAL98018281% 

@DasBasti DasBasti marked this pull request as ready for review June 4, 2026 11:15
Copilot AI review requested due to automatic review settings June 4, 2026 11:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Home Assistant SmartHashtag integration metadata to consume the fixed upstream login flow by bumping the pysmarthashtag dependency and aligning the integration’s own version accordingly.

Changes:

  • Bump dependency pysmarthashtag from 0.8.1 to 0.9.1 (login flow fix via upstream library).
  • Bump integration version from 0.8.3 to 0.8.4.

@DasBasti

DasBasti commented Jun 4, 2026

Copy link
Copy Markdown
Owner

@copilot the integration version will be bumped by the release. do not manually edit it in this PR

Copilot AI commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

@copilot the integration version will be bumped by the release. do not manually edit it in this PR

Addressed in commit 3383c56: removed the manual integration version bump and kept only the pysmarthashtag==0.9.1 dependency update.

Copilot AI requested a review from DasBasti June 4, 2026 11:22
@DasBasti DasBasti merged commit 638e61b into main Jun 4, 2026
7 of 8 checks passed
@DasBasti DasBasti deleted the copilot/explore-refreshing-login branch June 4, 2026 11:26
Sign up for free to 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.

Login doesn't work

3 participants