I don’t know if this is possible or not. I am trying to have a whole bunch of input_booleans so that I can toggle specific parts of the logging on or off. I think this will make it much easier to debug issues.
In the dev tools template this works for generating a list of the booleans I use to toggle logging
{% for boolean in states.input_boolean if "_logging" in boolean.entity_id %}
{{ boolean.entity_id }}{% if not loop.last %}, {% endif %}
{%- endfor %}
However I am struggling to work out how to use this in the trigger. I basically want the trigger to fire if the state of any of the entities in the list changes.
Thanks for the response, so am I right in thinking that I cannot do it at all as if it only evaluates when its true I would be able to turn logging on but not off?
To understand why, try creating a template that listens for state-changes of a dynamically generated list of entities and evaluates to True when one of the entities changes state. To make it initially easier, start with a fixed list of entities. The exercise will make you understand the hurdle better than any explanation.
If you really want/need an automation that is triggered whenever an input_boolean, from a dynamic list of such entities, changes state, that can be done using an event trigger that looks for a state_changed event and then uses an appropriate condition.
However, I have to ask, is that really what you need? What is the ultimate goal of the automation?
Thanks for the response Phil, What I want to make is a screen with an input select for the log level then a ton of input_booleans one for each type of logging so I can turn on and off specific sections of the log. I find it much easier if I can trim the log down to just the type of thing I am debugging. So for instance I would be able to change the logging level of automations to debug without rebooting or turn off mqtt logging.
I’m confused… it seems to me there are many things you just have to go through the logs to find out what the errors are or am I being a dufus and there is a much easier way?
How many errors are we talking about here and how frequently do they occur? Something is amiss if you feel you need a debugging infrastructure to manage them.
I’m just saying instead of building a huge infrastructure to change logging levels via helper entities, on the hopefully rare occasion when you need to adjust logging levels (and you want to do it without modifying a config file and restarting), why not just use the logger.set_level service from the dev tools page?