Repository navigation
fix: parse single-quoted SSO config values on the Hive login page - #169
Merged
Merged
Conversation
Since 2026-10-20 https://sso.hivehome.com/ emits its bootstrap config as window.HiveSSOPoolId = 'eu-west-1_...' (single quotes, spaces around =) instead of window.HiveSSOPoolId="...". _SSO_ASSIGNMENT only matched double quotes, so get_login_info() raised KeyError, returned None, and HiveAuthAsync.async_init crashed with AttributeError on self.data.get. Home Assistant then fails to set up the Hive integration after a restart (home-assistant/core#187516). Accept either quote character, requiring the closing quote to match, and add unit tests for the new format and for mismatched quotes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #169 +/- ##
======================================
Coverage ? 99.96%
======================================
Files ? 30
Lines ? 2643
Branches ? 310
======================================
Hits ? 2642
Misses ? 0
Partials ? 1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This was referenced Oct 20, 2026
Contributor
Author
|
Context: Home Assistant is currently broken for every Hive user by this login-page change (home-assistant/core#187516). HA pins pyhive-integration==1.0.9 from master, so a 2.0 release needs integration-side changes too (renamed methods). If a 1.0.10 from master (#170) is an option, HA can fix it with a one-line manifest bump. |
nsleigh
added a commit
to nsleigh/Hive-Custom-Component
that referenced
this pull request
Oct 20, 2026
Since 2026-10-20 sso.hivehome.com emits window.HiveSSO* assignments with single quotes, so _SSO_ASSIGNMENT matched nothing, get_login_info() hit KeyError 'HiveSSOPoolId' and the integration stuck in setup_retry. Accept either quote (closing quote must match). Mirrors Pyhass/Pyhive#169. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nsleigh
added a commit
to nsleigh/Pyhive
that referenced
this pull request
Oct 20, 2026
Since 2026-10-20 sso.hivehome.com emits window.HiveSSO* assignments with single quotes, so _SSO_ASSIGNMENT matched nothing and get_login_info() failed with KeyError 'HiveSSOPoolId'. Accept either quote (closing quote must match) and add tests. Applied from Pyhass#169 (by @matt-thepie) ahead of upstream merge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 20, 2026
|
Thanks for being so quick fixing this! You are literally keeping us all warm as the weather starts to get cooler 😄 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Since 20 October 2026, https://sso.hivehome.com/ emits its bootstrap config as
(single quotes, spaces around
=)._SSO_ASSIGNMENTonly matches double-quoted values, soget_login_info()hitsKeyError, returnsNone, andHiveAuthAsync.async_initcrashes withAttributeError: 'NoneType' object has no attribute 'get'. Home Assistant then fails to set up the Hive integration after any restart: home-assistant/core#187516.Fix
Accept either quote character, requiring the closing quote to match the opening one. Verified against the live page:
Tests
test_single_quoted_values_are_parsed(live format) andtest_mismatched_quotes_are_not_parsedpytest tests/unit: 859 passed;ruff check/ruff formatcleanHome Assistant currently pins
pyhive-integration==1.0.9frommaster, so the same change is also opened as a backport againstmasterfor a 1.0.10 patch release.🤖 Generated with Claude Code