WTH: Why do I have to change configuration.yaml & restart HA to debug a component?

The other day I was trying to figure out why I couldn’t get tts.google_say to work correctly. I went to logger and added tts: debug, and restarted HA, monitored the log, etc. Nothing showed up pertaining to my problem. I changed the entire logger to debug and lo and behold I saw the problematic entry scroll by at 60 mph!

  1. I’d like to know WTH there has to be a config file change (with restart) to start the debug process.
  2. Why can’t there be a UI process to enable debugging for a certain thing?
  3. I wonder why tts: debug didn’t work.
  1. You can (see below)
  2. See 1
  3. tts is not valid as the logger name for it, the correct name would be homeassistant.components.tts

You can change this under /developer-tools/services

image

homeassistant.components.tts: debug
1 Like

*insert mind-blown animated gif*

thanks!!

Do you have any tricks to finding out the full name to use when changing the logging level? Like how does someone know to do homeassistant.components.tts here and not just tts? I’m often starting from an error so I copy and paste the name from the error level log to enable debug level log for that component. Or I go into github and track it down. None of those seem particularly efficient though so I was wondering if you had some trick to expose the full name from the nice name for a given component within the UI or dev tools.

Logging for integrations have the same structure, they all starts with homeassistant.components. followed by the integration name, which in this case was tts.

For the slack integration it would be homeassistant.components.slack

I might say a follow up WTH is “Why do I have to go to the services page to change the logger level? Shouldn’t there be a log page where I can select which components to log at different levels?” If reasonable, I might create a different WTH for that.

A drop down selector type menu would be phenomenal!

You mean exactly like this?
https://community.home-assistant.io/t/logging-and-recorder-settings-via-the-ui/219485 :sweat_smile: