@strizhechenko что-то вроде такого, к примеру:

def vakiobusy(f, t):
# before work
if '09:00' <= t.time < '09:15':
f.state = 'on'
f.workmode = 'recuperator'
f.speed = 4

# at work
elif '09:15' <= t.time < '18:00':
# before meetings
if 12 <= t.hours <= 15 and 55 <= t.minutes <= 59:
f.speed = 7

# meetings
elif 12 <= t.hours <= 15 and 0 <= t.minutes <= 15:
f.speed = 1

else:
f.speed = 3

# after work
elif '18:00' <= t.time < '23:00':
f.speed = 3

# night
elif '23:00' <= t.time or t.time < '08:00':
f.state = off


def vakiorest(f, t):
# before sleep
if '20:00' <= t.time < '22:00':
f.state = 'on'
f.speed = 3

# max vent before sleep
elif '22:00' <= t.time < '22:15':
f.speed = 7

# sleep
elif '22:15' <= t.time or t.time < '19:00':
f.state = 'off'