Change Samsung TV WoL turn_on log from warning to debug#158676
Conversation
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.
|
Hey there @chemelli74, @epenet, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
|
If it's considered informative why not use info level for logging ? |
|
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. |
|
There was a debate when turn_on_action was implemented:
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 |
I like this idea ! |
|
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. |
|
Anything you need from me for this PR? |
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
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: