Skip to content

Change Samsung TV WoL turn_on log from warning to debug#158676

Merged
joostlek merged 1 commit into
home-assistant:devfrom
ptarjan:claude/fix-samsungtv-logging-01S9o4fjMRoTfrGMFgCYLzWC
Dec 23, 2025
Merged

Change Samsung TV WoL turn_on log from warning to debug#158676
joostlek merged 1 commit into
home-assistant:devfrom
ptarjan:claude/fix-samsungtv-logging-01S9o4fjMRoTfrGMFgCYLzWC

Conversation

@ptarjan
Copy link
Copy Markdown
Contributor

@ptarjan ptarjan commented Dec 10, 2025

The warning message "Attempting to turn on via Wake-On-Lan" fires every time the user turns on their TV via WoL, creating log noise. This should be a debug message since it's informational, not indicating an actual problem. If WoL isn't working, the user will notice because the TV won't turn on.

Breaking change

Proposed change

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:
  • Link to developer documentation pull request:
  • Link to frontend pull request:

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

The warning message "Attempting to turn on via Wake-On-Lan" fires every
time the user turns on their TV via WoL, creating log noise. This should
be a debug message since it's informational, not indicating an actual
problem. If WoL isn't working, the user will notice because the TV won't
turn on.
@home-assistant
Copy link
Copy Markdown
Contributor

Hey there @chemelli74, @epenet, mind taking a look at this pull request as it has been labeled with an integration (samsungtv) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of samsungtv can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign samsungtv Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@chemelli74
Copy link
Copy Markdown
Contributor

If it's considered informative why not use info level for logging ?

@ptarjan
Copy link
Copy Markdown
Contributor Author

ptarjan commented Dec 10, 2025

Good question. I chose debug over info for two reasons:

Consistency: The automation path on line 92 already uses debug level for the same type of message ("Attempting to turn on %s via automation"). Using debug for WoL keeps them consistent.

Log noise: With info, you'd still see the message 29 times - just at a lower severity. The issue isn't just that it was a warning, but that it appears every single time you turn on the TV. That's an implementation detail users don't need to see during normal operation.

debug is appropriate for "here's what the system is doing internally" messages. info is better for things users should be aware of, like "Device X came online" or "Integration loaded successfully" - events that happen occasionally, not on every action.

@epenet
Copy link
Copy Markdown
Contributor

epenet commented Dec 11, 2025

There was a debate when turn_on_action was implemented:

  • should we keep automatic wake-on-lan if there is a MAC but no automation?
  • or should we ask users to create an explicit wake-on-lan automation?

There were arguments on both side, and I guess the current message is the result of the flip-flop during that questionning.

If we are keeping the automatic wake-on-lan, then I agree that changing to debug is fine.

Another possibility is to deprecate it, and adjust to raise an issue "Implicit Wake-On-Lan is deprecated. Please create an explicit Wake-On-Lan automation, targetting {self._mac}."

cc @bdraco / @MartinHjelmare

@chemelli74
Copy link
Copy Markdown
Contributor

Another possibility is to deprecate it, and adjust to raise an issue "Implicit Wake-On-Lan is deprecated. Please create an explicit Wake-On-Lan automation, targetting {self._mac}."

I like this idea !

@MartinHjelmare
Copy link
Copy Markdown
Member

Yes, I don't think device integrating integrations should use wake_on_lan by default if they don't support turning on a device.

But changing that is a separate task than what this PR is about. I think we can simply approve this PR and merge it, and let the other task be done by someone that want's to take that on, in another PR.

Copy link
Copy Markdown
Contributor

@epenet epenet left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@ptarjan
Copy link
Copy Markdown
Contributor Author

ptarjan commented Dec 12, 2025

Anything you need from me for this PR?

@joostlek joostlek merged commit 34db548 into home-assistant:dev Dec 23, 2025
36 checks passed
@chemelli74 chemelli74 added this to the 2025.12.5 milestone Dec 24, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants