Repository navigation
Forward requested event type in Home Assistant event subscriptions - #1471
Merged
Merged
Conversation
Co-authored-by: FrankBakkerNl <13922018+FrankBakkerNl@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix SubscribeToHomeAssistantEventsAsync to send requested event type
Forward requested event type in Home Assistant event subscriptions
Sep 25, 2026
Collaborator
|
I think this look pretty good but will do a proper reivew when it is out of draft |
FrankBakkerNl
marked this pull request as ready for review
September 30, 2026 13:02
Contributor
|
Fix is solid. This was clearly forgotten as the argument is never used. Our own code never passes a value other than null here (except for some tests) so it would not break. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1471 +/- ##
====================================
Coverage 83% 83%
====================================
Files 201 201
Lines 4173 4176 +3
Branches 477 477
====================================
+ Hits 3480 3483 +3
Misses 496 496
Partials 197 197
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
helto4real
approved these changes
Oct 2, 2026
helto4real
enabled auto-merge (squash)
October 3, 2026 14:48
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.
SubscribeToHomeAssistantEventsAsync(eventType, ...)was constructingsubscribe_eventscommands withoutevent_type, causing every non-cached subscription to become an all-events subscription. For non-admin tokens this can fail as unauthorized; for admin tokens it silently over-subscribes.Behavior change
HomeAssistantConnection.SubscribeToHomeAssistantEventsInternalAsyncnow forwards the requestedeventTypeontoSubscribeEventCommand.EventType.null/empty event types and only changes the specific-event subscription path.Regression coverage
"state_changed"sends aSubscribeEventCommandwithEventType == "state_changed".Result
event_type.