Variable 'blend_time' isn't needed - it's just a copy of 'off_time'. Use off_time...