I need to call the same function every minute from inside my component.
I want to do it using the event loop so was thinking of using async_create_task and in my function check if enough time has passed. But this doesn’t feel right and that’s why the question: is there a way to periodically call a function from a component?
The _LOGGER is run once and after I get this error every 2 seconds
Traceback (most recent call last):
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
TypeError: 'NoneType' object is not callable