Skip to content

Remove unused Live Activity registration fields#4586

Draft
rwarner wants to merge 2 commits intohome-assistant:mainfrom
rwarner:fix/remove-unused-live-activity-registration-fields
Draft

Remove unused Live Activity registration fields#4586
rwarner wants to merge 2 commits intohome-assistant:mainfrom
rwarner:fix/remove-unused-live-activity-registration-fields

Conversation

@rwarner
Copy link
Copy Markdown
Contributor

@rwarner rwarner commented Apr 29, 2026

Summary

  • Removes supports_live_activities and supports_live_activities_frequent_updates from the app registration payload sent to HA

These fields were removed from the HA core side in home-assistant/core#166072 (the SCHEMA_APP_DATA schema no longer accepts them). Sending data that the server doesn't read wastes bandwidth on every registration.

Related

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings April 29, 2026 16:31
HA core no longer reads or stores these fields (removed in
home-assistant/core#166072 per code review). Sending unused data wastes
bandwidth on every app registration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@rwarner rwarner force-pushed the fix/remove-unused-live-activity-registration-fields branch from 7582033 to 292d968 Compare April 29, 2026 16:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes deprecated Live Activity support fields from the mobile app registration payload to align with updated Home Assistant Core schema and avoid sending unused data.

Changes:

  • Removed supports_live_activities and supports_live_activities_frequent_updates from AppData registration payload.
  • Kept Live Activity push-to-start token reporting for iOS 17.2+.
Comments suppressed due to low confidence (1)

Sources/Shared/API/HAAPI.swift:566

  • After removing the ActivityAuthorizationInfo usage, this file no longer references any ActivityKit types. The conditional import ActivityKit at the top of HAAPI.swift is now unused and will produce a compiler warning; please remove that import (keeping the #if os(iOS) && canImport(ActivityKit) guards around the registration fields if still needed for LiveActivityRegistry availability).
                Current.Log.info("ios component is not loaded; pretending there's no push config")
                return .value(.init())

Now that the supports_live_activities registration fields are gone,
ActivityKit types are no longer referenced in this file.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@37b4e7a). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4586   +/-   ##
=======================================
  Coverage        ?   43.26%           
=======================================
  Files           ?      275           
  Lines           ?    16694           
  Branches        ?        0           
=======================================
  Hits            ?     7222           
  Misses          ?     9472           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bgoncal
Copy link
Copy Markdown
Member

bgoncal commented Apr 29, 2026

Let's wait for the other PRs to merge it in sync

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants