1st iteration (the past):
add logging in YAML
logger:
default: info
logs:
homeassistant.components.fritz: debug
fritzconnection: debug
2nd iteration (current status):
start and stop debug logging for a specific integration in the UI
3rd iteration (feature request):
My proposal for the next step/3rd iteration:
Add services to start/stop debug logging. That way (the only way!) we can
- automate debug logging using automations, e. g. based on events or at least time schedule triggers
- restrict the debug logging to a sharp time interval and therefore only log what is needed, making it also easier to parse and check the log
service: homeassistant.start_debug_logging
data: {}
target:
integration: fritz
service: homeassistant.stop_debug_logging
data: {}
target:
integration: fritz
Current problem/motivation:
- Providing debug logs for issues which happen only every few days (or even weeks!) like in Unreliable sensor data (data usage) since firmware 7.50 - filter/block that data · Issue #86661 · home-assistant/core · GitHub is currently simply not possible. Catching the possible incident time (e. g. every night between 3 and 5 o’clock) is currently not possible, not efficiently.
- And the only alternative - having debug logging enabled FOR WEEKS - is in general not a good idea in my opinion (e. g. massive growth of LOG).