Skip to content

Change subscription INFO logs to DEBUG level#286

Merged
StevenLooman merged 3 commits into
StevenLooman:developmentfrom
ptarjan:claude/fix-verbose-logging-013fP4KA5dMvJLfqsenroErR
Dec 12, 2025
Merged

Change subscription INFO logs to DEBUG level#286
StevenLooman merged 3 commits into
StevenLooman:developmentfrom
ptarjan:claude/fix-verbose-logging-013fP4KA5dMvJLfqsenroErR

Conversation

@ptarjan
Copy link
Copy Markdown
Contributor

@ptarjan ptarjan commented Dec 11, 2025

Reduce log noise by downgrading two INFO level messages to DEBUG:

  • "No event_handler, event handling disabled"
  • "Device rejected subscription request"

These messages are not actionable by users and cause excessive log noise when devices are offline or unreachable. This addresses the issue raised in home-assistant/core#158677.

Reduce log noise by downgrading two INFO level messages to DEBUG:
- "No event_handler, event handling disabled"
- "Device rejected subscription request"

These messages are not actionable by users and cause excessive log
noise when devices are offline or unreachable. This addresses the
issue raised in home-assistant/core#158677.
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.02%. Comparing base (9838023) to head (4265a4b).
⚠️ Report is 3 commits behind head on development.

Additional details and impacted files
@@             Coverage Diff              @@
##           development     #286   +/-   ##
============================================
  Coverage        72.02%   72.02%           
============================================
  Files               18       18           
  Lines             4254     4254           
============================================
  Hits              3064     3064           
  Misses            1190     1190           

☔ 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.

@StevenLooman
Copy link
Copy Markdown
Owner

Thank you for this PR @ptarjan. You are right that these are not actionable for the user. Lets change these to the debug-level indeed.

I do wonder, however, what can be done to make this actionable, or better inform the (home assistant) user.

@StevenLooman
Copy link
Copy Markdown
Owner

StevenLooman commented Dec 12, 2025

@ptarjan
Copy link
Copy Markdown
Contributor Author

ptarjan commented Dec 12, 2025

Thank you. Updated the towncrier.

Suggestions for making this more actionable for Home Assistant users:

The library already has mechanisms that integrations can use to communicate device status:

  1. profile_device.available - Set to False when UpnpConnectionError occurs during resubscription (profile.py:271). Home Assistant could use this to show "Device unavailable" in the UI.

  2. on_event(service, []) callback - Called with an empty state_variables list to notify listeners of subscription failures when notify_errors=True (profile.py:275). This could trigger a user-visible status change.

  3. Exception propagation - UpnpResponseError is re-raised after logging, so Home Assistant can catch it and handle appropriately.

For the "Device rejected subscription" case specifically, this often means the device doesn't support eventing. Home Assistant could:

  • Fall back to polling mode
  • Show users something like "Live updates unavailable for this device - using polling"

The logging change here just removes the noise; the actionable information is already available through the API for integrations to surface to users in a more meaningful way.

@StevenLooman StevenLooman merged commit 0f2acba into StevenLooman:development Dec 12, 2025
9 checks passed
@StevenLooman
Copy link
Copy Markdown
Owner

Thanks! Do you want a release with this?

@ptarjan
Copy link
Copy Markdown
Contributor Author

ptarjan commented Dec 12, 2025

Sure, and then I can bump it in HA. Thanks!

@ptarjan ptarjan deleted the claude/fix-verbose-logging-013fP4KA5dMvJLfqsenroErR branch December 12, 2025 16:45
@StevenLooman
Copy link
Copy Markdown
Owner

I've released 0.46.1.

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.

3 participants