Open danroc opened 2 months ago
Try adding these lines somewhere in your app definition. It'll suppress the warning log lines for the event subsystem.
import logging
logging.getLogger('AppDaemon._events').setLevel('ERROR')
Thanks for the tip @jsl12. The logger should be "AppDaemon._state"
in this case, but I got the idea.
Another advantage of merging this PR is that it brings cancel_listen_state
on par with cancel_timer
, which already has the silent
parameter.
Description
This PR adds an optional
silent
parameter to thecancel_listen_state()
method. Ifsilent
is set toTrue
, no warning will be issued if the handle is not found.Closes: #2007
Manual testing
I tested this PR with the following app:
It produced the following output:
As expected, no warning is issued for the
dummy-handle-1
handle.Documentation
The documentation was automatically updated based on the docstring: