How to remove sun.sun from logger?

Hi there,

i’m trying to remove the sun-component logs from my logs. But how?

Seems like the logs are triggered by homeassistant.core?

17-03-18 10:17:30 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: new_state=<state sun.sun=above_horizon; friendly_name=Sun, next_setting=2017-03-18T17:22:01+00:00, elevation=29.51, azimuth=144.14, next_rising=2017-03-19T05:15:38+00:00 @ 2017-03-18T10:15:55.976494+01:00>, old_state=<state sun.sun=above_horizon; friendly_name=Sun, next_setting=2017-03-18T17:22:01+00:00, elevation=29.42, azimuth=143.87, next_rising=2017-03-19T05:15:38+00:00 @ 2017-03-18T10:15:55.976494+01:00>, entity_id=sun.sun>

I dont want to disable logging for homeassitant.core, wont i? There could be important informations?
My approach so far does not work:

logger:
  logs:
    homeassistant.components.websocket_api: warning
    yahooweather: critical
    yeelight: info
    homeassistant.core.sun: error
    homeassistant.sun: error
    core.sun: error

I believe there must be a simple solution i overread somewhere?

For normal operation, I just have

logger:
  default: warning

If I was looking for a problem, I would specify a lower level for a certain topic, but it hasn’t happened yet.

Thanks, but i dont like this approach :smiley:
I like to see all other informations logged by HASS. Just the sun informations are useless for me.

1 Like

I tried and failed to do the same thing,
it seems that you can just filter logs by what’s between square brackets in the log file, like

  • homeassistant.core
  • homeassistant.components.http.view
  • homeassistant.components.device_tracker.nmap_tracker

and you can also shorten it like

  • homeassistant.components.device_tracker

Unfortunately sun.sun isn’t between square brackets, it’s an entity_id

I see it’s an old thread but no one seems to have a solution for this.

Also related: Stop recording sun states when you don't need the elevation info