Bit of programming help

So how to do do a callback function in pyhton/HA.

What I want to to start a function off say func(expiretime), and not block, then after the time expires it calls another function?

any help would be great

Have a look at this part of the timer component. It schedules a call of the async_finish method at a specific point in time.

@danielperna84 Thanks perfect!!!