Managing logs for specific devices

at night, I turn a lot of our house off with ZWave devices, this has great results on my power bill. This means other devices then become unavailable.

Example; I turn off my office desk, this has a Bose SoundTouch on it which is also connected to HASS. My logger config is:

# https://home-assistant.io/components/logger/
logger:
  default: warn
  logs:
    # homeassistant.components.alert: info
    homeassistant.components.automation: info
    homeassistant.components.daikin: error
    pydaikin: error
    urllib3.connectionpool: critical
    homeassistant.components.http: info
    aiohttp: info
    homeassistant.components.media_player.soundtouch_20_soundtouch: critical

but I still get critical errors… Can I turn the errors off somehow? An example error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 436, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.1.219', port=8090): Max retries exceeded with url: /now_playing (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fb1cb64a250>: Failed to establish a new connection: [Errno 113] Host is unreachable'))

its just a little noisy. Can I move them into a different file even?

That’s an interesting question.
I had a less aggravated case with a REST sensor - it produced ERRORS so I just changed its log level to CRITICAL.

I haven’t tried, but it might be possible to use this technique to tweak the undesirable behaviour.

1 Like

yeah, it wont work: https://www.home-assistant.io/integrations/soundtouch/ no scan_internval setting. Good idea though.

well, as far as I can see SoundTouchDevice inherits from MediaPlayerDevice, which in turn inherits from Entity, which has scan_interval
The point here is you can tweak almost anything using this technique - in your case I though about tweaking logger so it does not produce errors for this particular integration.