You can’t specify a YAML key (as in “key: value”) via a template. In this case, the key is the module for which you want to change the logging level. However you could do this via a python_script:
I finally got around to trying this but i get the following error - any ideas?
2020-06-18 22:25:48 ERROR (SyncWorker_13) [homeassistant.components.python_script.set_log_level.py] Error executing script: expected a dictionary
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 272, in __call__
return self._compiled([], data)
File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 560, in validate_dict
raise er.DictInvalid('expected a dictionary', path)
voluptuous.error.DictInvalid: expected a dictionary
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/python_script/__init__.py", line 205, in execute
exec(compiled.code, restricted_globals)
File "set_log_level.py", line 7, in <module>
File "/usr/src/homeassistant/homeassistant/core.py", line 1182, in call
self._hass.loop,
File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 435, in result
return self.__get_result()
File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
File "/usr/src/homeassistant/homeassistant/core.py", line 1221, in async_call
processed_data = handler.schema(service_data)
File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 276, in __call__
raise er.MultipleInvalid([e])
voluptuous.error.MultipleInvalid: expected a dictionary
The service definitely works and calling services from python does so it should be. You might have to give a bit more info though. What exactly are you trying to do? Looks like you have initial set to doods, is that what you have the input text set to when you flip on debug logging? And what are you doing after that?
I’m looking at the code for doods and it looks like the only debugging logging it does is when processing an image just FYI.